1 // Copyright 2024 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package networkmanagement provides access to the Network Management API. 8 // 9 // For product documentation, see: https://cloud.google.com/ 10 // 11 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/networkmanagement/v1beta1" 27 // ... 28 // ctx := context.Background() 29 // networkmanagementService, err := networkmanagement.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // To use an API key for authentication (note: some APIs do not support API 38 // keys), use [google.golang.org/api/option.WithAPIKey]: 39 // 40 // networkmanagementService, err := networkmanagement.NewService(ctx, option.WithAPIKey("AIza...")) 41 // 42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 43 // flow, use [google.golang.org/api/option.WithTokenSource]: 44 // 45 // config := &oauth2.Config{...} 46 // // ... 47 // token, err := config.Exchange(ctx, ...) 48 // networkmanagementService, err := networkmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package networkmanagement // import "google.golang.org/api/networkmanagement/v1beta1" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "networkmanagement:v1beta1" 90 const apiName = "networkmanagement" 91 const apiVersion = "v1beta1" 92 const basePath = "https://networkmanagement.googleapis.com/" 93 const basePathTemplate = "https://networkmanagement.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://networkmanagement.mtls.googleapis.com/" 95 96 // OAuth2 scopes used by this API. 97 const ( 98 // See, edit, configure, and delete your Google Cloud data and see the email 99 // address for your Google Account. 100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 101 ) 102 103 // NewService creates a new Service. 104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 105 scopesOption := internaloption.WithDefaultScopes( 106 "https://www.googleapis.com/auth/cloud-platform", 107 ) 108 // NOTE: prepend, so we don't override user-specified scopes. 109 opts = append([]option.ClientOption{scopesOption}, opts...) 110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 113 opts = append(opts, internaloption.EnableNewAuthLibrary()) 114 client, endpoint, err := htransport.NewClient(ctx, opts...) 115 if err != nil { 116 return nil, err 117 } 118 s, err := New(client) 119 if err != nil { 120 return nil, err 121 } 122 if endpoint != "" { 123 s.BasePath = endpoint 124 } 125 return s, nil 126 } 127 128 // New creates a new Service. It uses the provided http.Client for requests. 129 // 130 // Deprecated: please use NewService instead. 131 // To provide a custom HTTP client, use option.WithHTTPClient. 132 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 133 func New(client *http.Client) (*Service, error) { 134 if client == nil { 135 return nil, errors.New("client is nil") 136 } 137 s := &Service{client: client, BasePath: basePath} 138 s.Projects = NewProjectsService(s) 139 return s, nil 140 } 141 142 type Service struct { 143 client *http.Client 144 BasePath string // API endpoint base URL 145 UserAgent string // optional additional User-Agent fragment 146 147 Projects *ProjectsService 148 } 149 150 func (s *Service) userAgent() string { 151 if s.UserAgent == "" { 152 return googleapi.UserAgent 153 } 154 return googleapi.UserAgent + " " + s.UserAgent 155 } 156 157 func NewProjectsService(s *Service) *ProjectsService { 158 rs := &ProjectsService{s: s} 159 rs.Locations = NewProjectsLocationsService(s) 160 return rs 161 } 162 163 type ProjectsService struct { 164 s *Service 165 166 Locations *ProjectsLocationsService 167 } 168 169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 170 rs := &ProjectsLocationsService{s: s} 171 rs.Global = NewProjectsLocationsGlobalService(s) 172 return rs 173 } 174 175 type ProjectsLocationsService struct { 176 s *Service 177 178 Global *ProjectsLocationsGlobalService 179 } 180 181 func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService { 182 rs := &ProjectsLocationsGlobalService{s: s} 183 rs.ConnectivityTests = NewProjectsLocationsGlobalConnectivityTestsService(s) 184 rs.Operations = NewProjectsLocationsGlobalOperationsService(s) 185 return rs 186 } 187 188 type ProjectsLocationsGlobalService struct { 189 s *Service 190 191 ConnectivityTests *ProjectsLocationsGlobalConnectivityTestsService 192 193 Operations *ProjectsLocationsGlobalOperationsService 194 } 195 196 func NewProjectsLocationsGlobalConnectivityTestsService(s *Service) *ProjectsLocationsGlobalConnectivityTestsService { 197 rs := &ProjectsLocationsGlobalConnectivityTestsService{s: s} 198 return rs 199 } 200 201 type ProjectsLocationsGlobalConnectivityTestsService struct { 202 s *Service 203 } 204 205 func NewProjectsLocationsGlobalOperationsService(s *Service) *ProjectsLocationsGlobalOperationsService { 206 rs := &ProjectsLocationsGlobalOperationsService{s: s} 207 return rs 208 } 209 210 type ProjectsLocationsGlobalOperationsService struct { 211 s *Service 212 } 213 214 // AbortInfo: Details of the final state "abort" and associated resource. 215 type AbortInfo struct { 216 // Cause: Causes that the analysis is aborted. 217 // 218 // Possible values: 219 // "CAUSE_UNSPECIFIED" - Cause is unspecified. 220 // "UNKNOWN_NETWORK" - Aborted due to unknown network. Deprecated, not used 221 // in the new tests. 222 // "UNKNOWN_PROJECT" - Aborted because no project information can be derived 223 // from the test input. Deprecated, not used in the new tests. 224 // "NO_EXTERNAL_IP" - Aborted because traffic is sent from a public IP to an 225 // instance without an external IP. Deprecated, not used in the new tests. 226 // "UNINTENDED_DESTINATION" - Aborted because none of the traces matches 227 // destination information specified in the input test request. Deprecated, not 228 // used in the new tests. 229 // "SOURCE_ENDPOINT_NOT_FOUND" - Aborted because the source endpoint could 230 // not be found. Deprecated, not used in the new tests. 231 // "MISMATCHED_SOURCE_NETWORK" - Aborted because the source network does not 232 // match the source endpoint. Deprecated, not used in the new tests. 233 // "DESTINATION_ENDPOINT_NOT_FOUND" - Aborted because the destination 234 // endpoint could not be found. Deprecated, not used in the new tests. 235 // "MISMATCHED_DESTINATION_NETWORK" - Aborted because the destination network 236 // does not match the destination endpoint. Deprecated, not used in the new 237 // tests. 238 // "UNKNOWN_IP" - Aborted because no endpoint with the packet's destination 239 // IP address is found. 240 // "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP" - Aborted because no endpoint with the 241 // packet's destination IP is found in the Google-managed project. 242 // "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK" - Aborted because the source IP 243 // address doesn't belong to any of the subnets of the source VPC network. 244 // "PERMISSION_DENIED" - Aborted because user lacks permission to access all 245 // or part of the network configurations required to run the test. 246 // "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS" - Aborted because user lacks 247 // permission to access Cloud NAT configs required to run the test. 248 // "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS" - Aborted because user lacks 249 // permission to access Network endpoint group endpoint configs required to run 250 // the test. 251 // "NO_SOURCE_LOCATION" - Aborted because no valid source or destination 252 // endpoint is derived from the input test request. 253 // "INVALID_ARGUMENT" - Aborted because the source or destination endpoint 254 // specified in the request is invalid. Some examples: - The request might 255 // contain malformed resource URI, project ID, or IP address. - The request 256 // might contain inconsistent information (for example, the request might 257 // include both the instance and the network, but the instance might not have a 258 // NIC in that network). 259 // "TRACE_TOO_LONG" - Aborted because the number of steps in the trace 260 // exceeds a certain limit. It might be caused by a routing loop. 261 // "INTERNAL_ERROR" - Aborted due to internal server error. 262 // "UNSUPPORTED" - Aborted because the test scenario is not supported. 263 // "MISMATCHED_IP_VERSION" - Aborted because the source and destination 264 // resources have no common IP version. 265 // "GKE_KONNECTIVITY_PROXY_UNSUPPORTED" - Aborted because the connection 266 // between the control plane and the node of the source cluster is initiated by 267 // the node and managed by the Konnectivity proxy. 268 // "RESOURCE_CONFIG_NOT_FOUND" - Aborted because expected resource 269 // configuration was missing. 270 // "VM_INSTANCE_CONFIG_NOT_FOUND" - Aborted because expected VM instance 271 // configuration was missing. 272 // "NETWORK_CONFIG_NOT_FOUND" - Aborted because expected network 273 // configuration was missing. 274 // "FIREWALL_CONFIG_NOT_FOUND" - Aborted because expected firewall 275 // configuration was missing. 276 // "ROUTE_CONFIG_NOT_FOUND" - Aborted because expected route configuration 277 // was missing. 278 // "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT" - Aborted because a PSC 279 // endpoint selection for the Google-managed service is ambiguous (several PSC 280 // endpoints satisfy test input). 281 // "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED" - Aborted because tests with a 282 // PSC-based Cloud SQL instance as a source are not supported. 283 // "SOURCE_FORWARDING_RULE_UNSUPPORTED" - Aborted because tests with a 284 // forwarding rule as a source are not supported. 285 // "NON_ROUTABLE_IP_ADDRESS" - Aborted because one of the endpoints is a 286 // non-routable IP address (loopback, link-local, etc). 287 // "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT" - Aborted due to an unknown 288 // issue in the Google-managed project. 289 // "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG" - Aborted due to an 290 // unsupported configuration of the Google-managed project. 291 Cause string `json:"cause,omitempty"` 292 // IpAddress: IP address that caused the abort. 293 IpAddress string `json:"ipAddress,omitempty"` 294 // ProjectsMissingPermission: List of project IDs the user specified in the 295 // request but lacks access to. In this case, analysis is aborted with the 296 // PERMISSION_DENIED cause. 297 ProjectsMissingPermission []string `json:"projectsMissingPermission,omitempty"` 298 // ResourceUri: URI of the resource that caused the abort. 299 ResourceUri string `json:"resourceUri,omitempty"` 300 // ForceSendFields is a list of field names (e.g. "Cause") to unconditionally 301 // include in API requests. By default, fields with empty or default values are 302 // omitted from API requests. See 303 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 304 // details. 305 ForceSendFields []string `json:"-"` 306 // NullFields is a list of field names (e.g. "Cause") to include in API 307 // requests with the JSON null value. By default, fields with empty values are 308 // omitted from API requests. See 309 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 310 NullFields []string `json:"-"` 311 } 312 313 func (s *AbortInfo) MarshalJSON() ([]byte, error) { 314 type NoMethod AbortInfo 315 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 316 } 317 318 // AppEngineVersionEndpoint: Wrapper for the App Engine service version 319 // attributes. 320 type AppEngineVersionEndpoint struct { 321 // Uri: An App Engine (https://cloud.google.com/appengine) [service 322 // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/ 323 // apps.services.versions) name. 324 Uri string `json:"uri,omitempty"` 325 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally 326 // include in API requests. By default, fields with empty or default values are 327 // omitted from API requests. See 328 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 329 // details. 330 ForceSendFields []string `json:"-"` 331 // NullFields is a list of field names (e.g. "Uri") to include in API requests 332 // with the JSON null value. By default, fields with empty values are omitted 333 // from API requests. See 334 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 335 NullFields []string `json:"-"` 336 } 337 338 func (s *AppEngineVersionEndpoint) MarshalJSON() ([]byte, error) { 339 type NoMethod AppEngineVersionEndpoint 340 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 341 } 342 343 // AppEngineVersionInfo: For display only. Metadata associated with an App 344 // Engine version. 345 type AppEngineVersionInfo struct { 346 // DisplayName: Name of an App Engine version. 347 DisplayName string `json:"displayName,omitempty"` 348 // Environment: App Engine execution environment for a version. 349 Environment string `json:"environment,omitempty"` 350 // Runtime: Runtime of the App Engine version. 351 Runtime string `json:"runtime,omitempty"` 352 // Uri: URI of an App Engine version. 353 Uri string `json:"uri,omitempty"` 354 // ForceSendFields is a list of field names (e.g. "DisplayName") to 355 // unconditionally include in API requests. By default, fields with empty or 356 // default values are omitted from API requests. See 357 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 358 // details. 359 ForceSendFields []string `json:"-"` 360 // NullFields is a list of field names (e.g. "DisplayName") to include in API 361 // requests with the JSON null value. By default, fields with empty values are 362 // omitted from API requests. See 363 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 364 NullFields []string `json:"-"` 365 } 366 367 func (s *AppEngineVersionInfo) MarshalJSON() ([]byte, error) { 368 type NoMethod AppEngineVersionInfo 369 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 370 } 371 372 // AuditConfig: Specifies the audit configuration for a service. The 373 // configuration determines which permission types are logged, and what 374 // identities, if any, are exempted from logging. An AuditConfig must have one 375 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices` 376 // and a specific service, the union of the two AuditConfigs is used for that 377 // service: the log_types specified in each AuditConfig are enabled, and the 378 // exempted_members in each AuditLogConfig are exempted. Example Policy with 379 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", 380 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ 381 // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": 382 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", 383 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": 384 // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For 385 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ 386 // logging. It also exempts `jose@example.com` from DATA_READ logging, and 387 // `aliya@example.com` from DATA_WRITE logging. 388 type AuditConfig struct { 389 // AuditLogConfigs: The configuration for logging of each type of permission. 390 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 391 // Service: Specifies a service that will be enabled for audit logging. For 392 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` 393 // is a special value that covers all services. 394 Service string `json:"service,omitempty"` 395 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 396 // unconditionally include in API requests. By default, fields with empty or 397 // default values are omitted from API requests. See 398 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 399 // details. 400 ForceSendFields []string `json:"-"` 401 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in 402 // API requests with the JSON null value. By default, fields with empty values 403 // are omitted from API requests. See 404 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 405 NullFields []string `json:"-"` 406 } 407 408 func (s *AuditConfig) MarshalJSON() ([]byte, error) { 409 type NoMethod AuditConfig 410 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 411 } 412 413 // AuditLogConfig: Provides the configuration for logging a type of 414 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", 415 // "exempted_members": [ "user:jose@example.com" ] }, { "log_type": 416 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while 417 // exempting jose@example.com from DATA_READ logging. 418 type AuditLogConfig struct { 419 // ExemptedMembers: Specifies the identities that do not cause logging for this 420 // type of permission. Follows the same format of Binding.members. 421 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 422 // LogType: The log type that this config enables. 423 // 424 // Possible values: 425 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 426 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 427 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 428 // "DATA_READ" - Data reads. Example: CloudSQL Users list 429 LogType string `json:"logType,omitempty"` 430 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 431 // unconditionally include in API requests. By default, fields with empty or 432 // default values are omitted from API requests. See 433 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 434 // details. 435 ForceSendFields []string `json:"-"` 436 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in 437 // API requests with the JSON null value. By default, fields with empty values 438 // are omitted from API requests. See 439 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 440 NullFields []string `json:"-"` 441 } 442 443 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 444 type NoMethod AuditLogConfig 445 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 446 } 447 448 // Binding: Associates `members`, or principals, with a `role`. 449 type Binding struct { 450 // Condition: The condition that is associated with this binding. If the 451 // condition evaluates to `true`, then this binding applies to the current 452 // request. If the condition evaluates to `false`, then this binding does not 453 // apply to the current request. However, a different role binding might grant 454 // the same role to one or more of the principals in this binding. To learn 455 // which resources support conditions in their IAM policies, see the IAM 456 // documentation 457 // (https://cloud.google.com/iam/help/conditions/resource-policies). 458 Condition *Expr `json:"condition,omitempty"` 459 // Members: Specifies the principals requesting access for a Google Cloud 460 // resource. `members` can have the following values: * `allUsers`: A special 461 // identifier that represents anyone who is on the internet; with or without a 462 // Google account. * `allAuthenticatedUsers`: A special identifier that 463 // represents anyone who is authenticated with a Google account or a service 464 // account. Does not include identities that come from external identity 465 // providers (IdPs) through identity federation. * `user:{emailid}`: An email 466 // address that represents a specific Google account. For example, 467 // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that 468 // represents a Google service account. For example, 469 // `my-other-app@appspot.gserviceaccount.com`. * 470 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An 471 // identifier for a Kubernetes service account 472 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). 473 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * 474 // `group:{emailid}`: An email address that represents a Google group. For 475 // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain 476 // (primary) that represents all the users of that domain. For example, 477 // `google.com` or `example.com`. * 478 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub 479 // ject/{subject_attribute_value}`: A single identity in a workforce identity 480 // pool. * 481 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 482 // group/{group_id}`: All workforce identities in a group. * 483 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 484 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with 485 // a specific attribute value. * 486 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 487 // *`: All identities in a workforce identity pool. * 488 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo 489 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single 490 // identity in a workload identity pool. * 491 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 492 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool 493 // group. * 494 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 495 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} 496 // `: All identities in a workload identity pool with a certain attribute. * 497 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 498 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity 499 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 500 // unique identifier) representing a user that has been recently deleted. For 501 // example, `alice@example.com?uid=123456789012345678901`. If the user is 502 // recovered, this value reverts to `user:{emailid}` and the recovered user 503 // retains the role in the binding. * 504 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus 505 // unique identifier) representing a service account that has been recently 506 // deleted. For example, 507 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the 508 // service account is undeleted, this value reverts to 509 // `serviceAccount:{emailid}` and the undeleted service account retains the 510 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email 511 // address (plus unique identifier) representing a Google group that has been 512 // recently deleted. For example, 513 // `admins@example.com?uid=123456789012345678901`. If the group is recovered, 514 // this value reverts to `group:{emailid}` and the recovered group retains the 515 // role in the binding. * 516 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool 517 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a 518 // workforce identity pool. For example, 519 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po 520 // ol-id/subject/my-subject-attribute-value`. 521 Members []string `json:"members,omitempty"` 522 // Role: Role that is assigned to the list of `members`, or principals. For 523 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview 524 // of the IAM roles and permissions, see the IAM documentation 525 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the 526 // available pre-defined roles, see here 527 // (https://cloud.google.com/iam/docs/understanding-roles). 528 Role string `json:"role,omitempty"` 529 // ForceSendFields is a list of field names (e.g. "Condition") to 530 // unconditionally include in API requests. By default, fields with empty or 531 // default values are omitted from API requests. See 532 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 533 // details. 534 ForceSendFields []string `json:"-"` 535 // NullFields is a list of field names (e.g. "Condition") to include in API 536 // requests with the JSON null value. By default, fields with empty values are 537 // omitted from API requests. See 538 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 539 NullFields []string `json:"-"` 540 } 541 542 func (s *Binding) MarshalJSON() ([]byte, error) { 543 type NoMethod Binding 544 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 545 } 546 547 // CancelOperationRequest: The request message for Operations.CancelOperation. 548 type CancelOperationRequest struct { 549 } 550 551 // CloudFunctionEndpoint: Wrapper for Cloud Function attributes. 552 type CloudFunctionEndpoint struct { 553 // Uri: A Cloud Function (https://cloud.google.com/functions) name. 554 Uri string `json:"uri,omitempty"` 555 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally 556 // include in API requests. By default, fields with empty or default values are 557 // omitted from API requests. See 558 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 559 // details. 560 ForceSendFields []string `json:"-"` 561 // NullFields is a list of field names (e.g. "Uri") to include in API requests 562 // with the JSON null value. By default, fields with empty values are omitted 563 // from API requests. See 564 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 565 NullFields []string `json:"-"` 566 } 567 568 func (s *CloudFunctionEndpoint) MarshalJSON() ([]byte, error) { 569 type NoMethod CloudFunctionEndpoint 570 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 571 } 572 573 // CloudFunctionInfo: For display only. Metadata associated with a Cloud 574 // Function. 575 type CloudFunctionInfo struct { 576 // DisplayName: Name of a Cloud Function. 577 DisplayName string `json:"displayName,omitempty"` 578 // Location: Location in which the Cloud Function is deployed. 579 Location string `json:"location,omitempty"` 580 // Uri: URI of a Cloud Function. 581 Uri string `json:"uri,omitempty"` 582 // VersionId: Latest successfully deployed version id of the Cloud Function. 583 VersionId int64 `json:"versionId,omitempty,string"` 584 // ForceSendFields is a list of field names (e.g. "DisplayName") to 585 // unconditionally include in API requests. By default, fields with empty or 586 // default values are omitted from API requests. See 587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 588 // details. 589 ForceSendFields []string `json:"-"` 590 // NullFields is a list of field names (e.g. "DisplayName") to include in API 591 // requests with the JSON null value. By default, fields with empty values are 592 // omitted from API requests. See 593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 594 NullFields []string `json:"-"` 595 } 596 597 func (s *CloudFunctionInfo) MarshalJSON() ([]byte, error) { 598 type NoMethod CloudFunctionInfo 599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 600 } 601 602 // CloudRunRevisionEndpoint: Wrapper for Cloud Run revision attributes. 603 type CloudRunRevisionEndpoint struct { 604 // Uri: A Cloud Run (https://cloud.google.com/run) 605 // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.rev 606 // isions/get) URI. The format is: 607 // projects/{project}/locations/{location}/revisions/{revision} 608 Uri string `json:"uri,omitempty"` 609 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally 610 // include in API requests. By default, fields with empty or default values are 611 // omitted from API requests. See 612 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 613 // details. 614 ForceSendFields []string `json:"-"` 615 // NullFields is a list of field names (e.g. "Uri") to include in API requests 616 // with the JSON null value. By default, fields with empty values are omitted 617 // from API requests. See 618 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 619 NullFields []string `json:"-"` 620 } 621 622 func (s *CloudRunRevisionEndpoint) MarshalJSON() ([]byte, error) { 623 type NoMethod CloudRunRevisionEndpoint 624 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 625 } 626 627 // CloudRunRevisionInfo: For display only. Metadata associated with a Cloud Run 628 // revision. 629 type CloudRunRevisionInfo struct { 630 // DisplayName: Name of a Cloud Run revision. 631 DisplayName string `json:"displayName,omitempty"` 632 // Location: Location in which this revision is deployed. 633 Location string `json:"location,omitempty"` 634 // ServiceUri: URI of Cloud Run service this revision belongs to. 635 ServiceUri string `json:"serviceUri,omitempty"` 636 // Uri: URI of a Cloud Run revision. 637 Uri string `json:"uri,omitempty"` 638 // ForceSendFields is a list of field names (e.g. "DisplayName") to 639 // unconditionally include in API requests. By default, fields with empty or 640 // default values are omitted from API requests. See 641 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 642 // details. 643 ForceSendFields []string `json:"-"` 644 // NullFields is a list of field names (e.g. "DisplayName") to include in API 645 // requests with the JSON null value. By default, fields with empty values are 646 // omitted from API requests. See 647 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 648 NullFields []string `json:"-"` 649 } 650 651 func (s *CloudRunRevisionInfo) MarshalJSON() ([]byte, error) { 652 type NoMethod CloudRunRevisionInfo 653 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 654 } 655 656 // CloudSQLInstanceInfo: For display only. Metadata associated with a Cloud SQL 657 // instance. 658 type CloudSQLInstanceInfo struct { 659 // DisplayName: Name of a Cloud SQL instance. 660 DisplayName string `json:"displayName,omitempty"` 661 // ExternalIp: External IP address of a Cloud SQL instance. 662 ExternalIp string `json:"externalIp,omitempty"` 663 // InternalIp: Internal IP address of a Cloud SQL instance. 664 InternalIp string `json:"internalIp,omitempty"` 665 // NetworkUri: URI of a Cloud SQL instance network or empty string if the 666 // instance does not have one. 667 NetworkUri string `json:"networkUri,omitempty"` 668 // Region: Region in which the Cloud SQL instance is running. 669 Region string `json:"region,omitempty"` 670 // Uri: URI of a Cloud SQL instance. 671 Uri string `json:"uri,omitempty"` 672 // ForceSendFields is a list of field names (e.g. "DisplayName") to 673 // unconditionally include in API requests. By default, fields with empty or 674 // default values are omitted from API requests. See 675 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 676 // details. 677 ForceSendFields []string `json:"-"` 678 // NullFields is a list of field names (e.g. "DisplayName") to include in API 679 // requests with the JSON null value. By default, fields with empty values are 680 // omitted from API requests. See 681 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 682 NullFields []string `json:"-"` 683 } 684 685 func (s *CloudSQLInstanceInfo) MarshalJSON() ([]byte, error) { 686 type NoMethod CloudSQLInstanceInfo 687 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 688 } 689 690 // ConnectivityTest: A Connectivity Test for a network reachability analysis. 691 type ConnectivityTest struct { 692 // BypassFirewallChecks: Whether the test should skip firewall checking. If not 693 // provided, we assume false. 694 BypassFirewallChecks bool `json:"bypassFirewallChecks,omitempty"` 695 // CreateTime: Output only. The time the test was created. 696 CreateTime string `json:"createTime,omitempty"` 697 // Description: The user-supplied description of the Connectivity Test. Maximum 698 // of 512 characters. 699 Description string `json:"description,omitempty"` 700 // Destination: Required. Destination specification of the Connectivity Test. 701 // You can use a combination of destination IP address, Compute Engine VM 702 // instance, or VPC network to uniquely identify the destination location. Even 703 // if the destination IP address is not unique, the source IP location is 704 // unique. Usually, the analysis can infer the destination endpoint from route 705 // information. If the destination you specify is a VM instance and the 706 // instance has multiple network interfaces, then you must also specify either 707 // a destination IP address or VPC network to identify the destination 708 // interface. A reachability analysis proceeds even if the destination location 709 // is ambiguous. However, the result can include endpoints that you don't 710 // intend to test. 711 Destination *Endpoint `json:"destination,omitempty"` 712 // DisplayName: Output only. The display name of a Connectivity Test. 713 DisplayName string `json:"displayName,omitempty"` 714 // Labels: Resource labels to represent user-provided metadata. 715 Labels map[string]string `json:"labels,omitempty"` 716 // Name: Identifier. Unique name of the resource using the form: 717 // `projects/{project_id}/locations/global/connectivityTests/{test}` 718 Name string `json:"name,omitempty"` 719 // ProbingDetails: Output only. The probing details of this test from the 720 // latest run, present for applicable tests only. The details are updated when 721 // creating a new test, updating an existing test, or triggering a one-time 722 // rerun of an existing test. 723 ProbingDetails *ProbingDetails `json:"probingDetails,omitempty"` 724 // Protocol: IP Protocol of the test. When not provided, "TCP" is assumed. 725 Protocol string `json:"protocol,omitempty"` 726 // ReachabilityDetails: Output only. The reachability details of this test from 727 // the latest run. The details are updated when creating a new test, updating 728 // an existing test, or triggering a one-time rerun of an existing test. 729 ReachabilityDetails *ReachabilityDetails `json:"reachabilityDetails,omitempty"` 730 // RelatedProjects: Other projects that may be relevant for reachability 731 // analysis. This is applicable to scenarios where a test can cross project 732 // boundaries. 733 RelatedProjects []string `json:"relatedProjects,omitempty"` 734 // Source: Required. Source specification of the Connectivity Test. You can use 735 // a combination of source IP address, virtual machine (VM) instance, or 736 // Compute Engine network to uniquely identify the source location. Examples: 737 // If the source IP address is an internal IP address within a Google Cloud 738 // Virtual Private Cloud (VPC) network, then you must also specify the VPC 739 // network. Otherwise, specify the VM instance, which already contains its 740 // internal IP address and VPC network information. If the source of the test 741 // is within an on-premises network, then you must provide the destination VPC 742 // network. If the source endpoint is a Compute Engine VM instance with 743 // multiple network interfaces, the instance itself is not sufficient to 744 // identify the endpoint. So, you must also specify the source IP address or 745 // VPC network. A reachability analysis proceeds even if the source location is 746 // ambiguous. However, the test result may include endpoints that you don't 747 // intend to test. 748 Source *Endpoint `json:"source,omitempty"` 749 // UpdateTime: Output only. The time the test's configuration was updated. 750 UpdateTime string `json:"updateTime,omitempty"` 751 752 // ServerResponse contains the HTTP response code and headers from the server. 753 googleapi.ServerResponse `json:"-"` 754 // ForceSendFields is a list of field names (e.g. "BypassFirewallChecks") to 755 // unconditionally include in API requests. By default, fields with empty or 756 // default values are omitted from API requests. See 757 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 758 // details. 759 ForceSendFields []string `json:"-"` 760 // NullFields is a list of field names (e.g. "BypassFirewallChecks") to include 761 // in API requests with the JSON null value. By default, fields with empty 762 // values are omitted from API requests. See 763 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 764 NullFields []string `json:"-"` 765 } 766 767 func (s *ConnectivityTest) MarshalJSON() ([]byte, error) { 768 type NoMethod ConnectivityTest 769 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 770 } 771 772 // DeliverInfo: Details of the final state "deliver" and associated resource. 773 type DeliverInfo struct { 774 // IpAddress: IP address of the target (if applicable). 775 IpAddress string `json:"ipAddress,omitempty"` 776 // ResourceUri: URI of the resource that the packet is delivered to. 777 ResourceUri string `json:"resourceUri,omitempty"` 778 // Target: Target type where the packet is delivered to. 779 // 780 // Possible values: 781 // "TARGET_UNSPECIFIED" - Target not specified. 782 // "INSTANCE" - Target is a Compute Engine instance. 783 // "INTERNET" - Target is the internet. 784 // "GOOGLE_API" - Target is a Google API. 785 // "GKE_MASTER" - Target is a Google Kubernetes Engine cluster master. 786 // "CLOUD_SQL_INSTANCE" - Target is a Cloud SQL instance. 787 // "PSC_PUBLISHED_SERVICE" - Target is a published service that uses [Private 788 // Service 789 // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect- 790 // services). 791 // "PSC_GOOGLE_API" - Target is all Google APIs that use [Private Service 792 // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect- 793 // apis). 794 // "PSC_VPC_SC" - Target is a VPC-SC that uses [Private Service 795 // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect- 796 // apis). 797 // "SERVERLESS_NEG" - Target is a serverless network endpoint group. 798 // "STORAGE_BUCKET" - Target is a Cloud Storage bucket. 799 // "PRIVATE_NETWORK" - Target is a private network. Used only for return 800 // traces. 801 // "CLOUD_FUNCTION" - Target is a Cloud Function. Used only for return 802 // traces. 803 // "APP_ENGINE_VERSION" - Target is a App Engine service version. Used only 804 // for return traces. 805 // "CLOUD_RUN_REVISION" - Target is a Cloud Run revision. Used only for 806 // return traces. 807 Target string `json:"target,omitempty"` 808 // ForceSendFields is a list of field names (e.g. "IpAddress") to 809 // unconditionally include in API requests. By default, fields with empty or 810 // default values are omitted from API requests. See 811 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 812 // details. 813 ForceSendFields []string `json:"-"` 814 // NullFields is a list of field names (e.g. "IpAddress") to include in API 815 // requests with the JSON null value. By default, fields with empty values are 816 // omitted from API requests. See 817 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 818 NullFields []string `json:"-"` 819 } 820 821 func (s *DeliverInfo) MarshalJSON() ([]byte, error) { 822 type NoMethod DeliverInfo 823 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 824 } 825 826 // DropInfo: Details of the final state "drop" and associated resource. 827 type DropInfo struct { 828 // Cause: Cause that the packet is dropped. 829 // 830 // Possible values: 831 // "CAUSE_UNSPECIFIED" - Cause is unspecified. 832 // "UNKNOWN_EXTERNAL_ADDRESS" - Destination external address cannot be 833 // resolved to a known target. If the address is used in a Google Cloud 834 // project, provide the project ID as test input. 835 // "FOREIGN_IP_DISALLOWED" - A Compute Engine instance can only send or 836 // receive a packet with a foreign IP address if ip_forward is enabled. 837 // "FIREWALL_RULE" - Dropped due to a firewall rule, unless allowed due to 838 // connection tracking. 839 // "NO_ROUTE" - Dropped due to no matching routes. 840 // "ROUTE_BLACKHOLE" - Dropped due to invalid route. Route's next hop is a 841 // blackhole. 842 // "ROUTE_WRONG_NETWORK" - Packet is sent to a wrong (unintended) network. 843 // Example: you trace a packet from VM1:Network1 to VM2:Network2, however, the 844 // route configured in Network1 sends the packet destined for VM2's IP address 845 // to Network3. 846 // "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED" - Route's next hop IP address 847 // cannot be resolved to a GCP resource. 848 // "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND" - Route's next hop resource is not 849 // found. 850 // "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK" - Route's next hop instance 851 // doesn't have a NIC in the route's network. 852 // "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP" - Route's next hop IP address is 853 // not a primary IP address of the next hop instance. 854 // "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH" - Route's next hop forwarding 855 // rule doesn't match next hop IP address. 856 // "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED" - Route's next hop VPN tunnel 857 // is down (does not have valid IKE SAs). 858 // "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID" - Route's next hop 859 // forwarding rule type is invalid (it's not a forwarding rule of the internal 860 // passthrough load balancer). 861 // "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS" - Packet is sent from the 862 // Internet to the private IPv6 address. 863 // "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH" - The packet does not match a 864 // policy-based VPN tunnel local selector. 865 // "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH" - The packet does not match a 866 // policy-based VPN tunnel remote selector. 867 // "PRIVATE_TRAFFIC_TO_INTERNET" - Packet with internal destination address 868 // sent to the internet gateway. 869 // "PRIVATE_GOOGLE_ACCESS_DISALLOWED" - Instance with only an internal IP 870 // address tries to access Google API and services, but private Google access 871 // is not enabled in the subnet. 872 // "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED" - Source endpoint tries 873 // to access Google API and services through the VPN tunnel to another network, 874 // but Private Google Access needs to be enabled in the source endpoint 875 // network. 876 // "NO_EXTERNAL_ADDRESS" - Instance with only an internal IP address tries to 877 // access external hosts, but Cloud NAT is not enabled in the subnet, unless 878 // special configurations on a VM allow this connection. 879 // "UNKNOWN_INTERNAL_ADDRESS" - Destination internal address cannot be 880 // resolved to a known target. If this is a shared VPC scenario, verify if the 881 // service project ID is provided as test input. Otherwise, verify if the IP 882 // address is being used in the project. 883 // "FORWARDING_RULE_MISMATCH" - Forwarding rule's protocol and ports do not 884 // match the packet header. 885 // "FORWARDING_RULE_NO_INSTANCES" - Forwarding rule does not have backends 886 // configured. 887 // "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK" - Firewalls block 888 // the health check probes to the backends and cause the backends to be 889 // unavailable for traffic from the load balancer. For more details, see 890 // [Health check firewall 891 // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_ru 892 // les). 893 // "INSTANCE_NOT_RUNNING" - Packet is sent from or to a Compute Engine 894 // instance that is not in a running state. 895 // "GKE_CLUSTER_NOT_RUNNING" - Packet sent from or to a GKE cluster that is 896 // not in running state. 897 // "CLOUD_SQL_INSTANCE_NOT_RUNNING" - Packet sent from or to a Cloud SQL 898 // instance that is not in running state. 899 // "TRAFFIC_TYPE_BLOCKED" - The type of traffic is blocked and the user 900 // cannot configure a firewall rule to enable it. See [Always blocked 901 // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for 902 // more details. 903 // "GKE_MASTER_UNAUTHORIZED_ACCESS" - Access to Google Kubernetes Engine 904 // cluster master's endpoint is not authorized. See [Access to the cluster 905 // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clu 906 // sters#access_to_the_cluster_endpoints) for more details. 907 // "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS" - Access to the Cloud SQL 908 // instance endpoint is not authorized. See [Authorizing with authorized 909 // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for 910 // more details. 911 // "DROPPED_INSIDE_GKE_SERVICE" - Packet was dropped inside Google Kubernetes 912 // Engine Service. 913 // "DROPPED_INSIDE_CLOUD_SQL_SERVICE" - Packet was dropped inside Cloud SQL 914 // Service. 915 // "GOOGLE_MANAGED_SERVICE_NO_PEERING" - Packet was dropped because there is 916 // no peering between the originating network and the Google Managed Services 917 // Network. 918 // "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT" - Packet was dropped because the 919 // Google-managed service uses Private Service Connect (PSC), but the PSC 920 // endpoint is not found in the project. 921 // "GKE_PSC_ENDPOINT_MISSING" - Packet was dropped because the GKE cluster 922 // uses Private Service Connect (PSC), but the PSC endpoint is not found in the 923 // project. 924 // "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS" - Packet was dropped because the Cloud 925 // SQL instance has neither a private nor a public IP address. 926 // "GKE_CONTROL_PLANE_REGION_MISMATCH" - Packet was dropped because a GKE 927 // cluster private endpoint is unreachable from a region different from the 928 // cluster's region. 929 // "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION" - Packet sent from a 930 // public GKE cluster control plane to a private IP address. 931 // "GKE_CONTROL_PLANE_NO_ROUTE" - Packet was dropped because there is no 932 // route from a GKE cluster control plane to a destination network. 933 // "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC" - Packet sent 934 // from a Cloud SQL instance to an external IP address is not allowed. The 935 // Cloud SQL instance is not configured to send packets to external IP 936 // addresses. 937 // "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION" - Packet sent from a 938 // Cloud SQL instance with only a public IP address to a private IP address. 939 // "CLOUD_SQL_INSTANCE_NO_ROUTE" - Packet was dropped because there is no 940 // route from a Cloud SQL instance to a destination network. 941 // "CLOUD_FUNCTION_NOT_ACTIVE" - Packet could be dropped because the Cloud 942 // Function is not in an active status. 943 // "VPC_CONNECTOR_NOT_SET" - Packet could be dropped because no VPC connector 944 // is set. 945 // "VPC_CONNECTOR_NOT_RUNNING" - Packet could be dropped because the VPC 946 // connector is not in a running state. 947 // "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED" - Packet could be dropped 948 // because the traffic from the serverless service to the VPC connector is not 949 // allowed. 950 // "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED" - Packet could be dropped 951 // because the health check traffic to the VPC connector is not allowed. 952 // "FORWARDING_RULE_REGION_MISMATCH" - Packet could be dropped because it was 953 // sent from a different region to a regional forwarding without global access. 954 // "PSC_CONNECTION_NOT_ACCEPTED" - The Private Service Connect endpoint is in 955 // a project that is not approved to connect to the service. 956 // "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK" - The packet is sent to the 957 // Private Service Connect endpoint over the peering, but [it's not 958 // supported](https://cloud.google.com/vpc/docs/configure-private-service-connec 959 // t-services#on-premises). 960 // "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS" - The packet is sent to the 961 // Private Service Connect backend (network endpoint group), but the producer 962 // PSC forwarding rule does not have global access enabled. 963 // "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS" - The packet is sent to 964 // the Private Service Connect backend (network endpoint group), but the 965 // producer PSC forwarding rule has multiple ports specified. 966 // "CLOUD_SQL_PSC_NEG_UNSUPPORTED" - The packet is sent to the Private 967 // Service Connect backend (network endpoint group) targeting a Cloud SQL 968 // service attachment, but this configuration is not supported. 969 // "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT" - No NAT subnets are defined 970 // for the PSC service attachment. 971 // "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED" - The packet sent from the hybrid 972 // NEG proxy matches a non-dynamic route, but such a configuration is not 973 // supported. 974 // "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED" - The packet sent from the 975 // hybrid NEG proxy matches a dynamic route with a next hop in a different 976 // region, but such a configuration is not supported. 977 // "CLOUD_RUN_REVISION_NOT_READY" - Packet sent from a Cloud Run revision 978 // that is not ready. 979 // "DROPPED_INSIDE_PSC_SERVICE_PRODUCER" - Packet was dropped inside Private 980 // Service Connect service producer. 981 // "LOAD_BALANCER_HAS_NO_PROXY_SUBNET" - Packet sent to a load balancer, 982 // which requires a proxy-only subnet and the subnet is not found. 983 // "CLOUD_NAT_NO_ADDRESSES" - Packet sent to Cloud Nat without active NAT 984 // IPs. 985 // "ROUTING_LOOP" - Packet is stuck in a routing loop. 986 Cause string `json:"cause,omitempty"` 987 // DestinationIp: Destination IP address of the dropped packet (if relevant). 988 DestinationIp string `json:"destinationIp,omitempty"` 989 // Region: Region of the dropped packet (if relevant). 990 Region string `json:"region,omitempty"` 991 // ResourceUri: URI of the resource that caused the drop. 992 ResourceUri string `json:"resourceUri,omitempty"` 993 // SourceIp: Source IP address of the dropped packet (if relevant). 994 SourceIp string `json:"sourceIp,omitempty"` 995 // ForceSendFields is a list of field names (e.g. "Cause") to unconditionally 996 // include in API requests. By default, fields with empty or default values are 997 // omitted from API requests. See 998 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 999 // details. 1000 ForceSendFields []string `json:"-"` 1001 // NullFields is a list of field names (e.g. "Cause") to include in API 1002 // requests with the JSON null value. By default, fields with empty values are 1003 // omitted from API requests. See 1004 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1005 NullFields []string `json:"-"` 1006 } 1007 1008 func (s *DropInfo) MarshalJSON() ([]byte, error) { 1009 type NoMethod DropInfo 1010 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1011 } 1012 1013 // EdgeLocation: Representation of a network edge location as per 1014 // https://cloud.google.com/vpc/docs/edge-locations. 1015 type EdgeLocation struct { 1016 // MetropolitanArea: Name of the metropolitan area. 1017 MetropolitanArea string `json:"metropolitanArea,omitempty"` 1018 // ForceSendFields is a list of field names (e.g. "MetropolitanArea") to 1019 // unconditionally include in API requests. By default, fields with empty or 1020 // default values are omitted from API requests. See 1021 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1022 // details. 1023 ForceSendFields []string `json:"-"` 1024 // NullFields is a list of field names (e.g. "MetropolitanArea") to include in 1025 // API requests with the JSON null value. By default, fields with empty values 1026 // are omitted from API requests. See 1027 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1028 NullFields []string `json:"-"` 1029 } 1030 1031 func (s *EdgeLocation) MarshalJSON() ([]byte, error) { 1032 type NoMethod EdgeLocation 1033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1034 } 1035 1036 // Empty: A generic empty message that you can re-use to avoid defining 1037 // duplicated empty messages in your APIs. A typical example is to use it as 1038 // the request or the response type of an API method. For instance: service Foo 1039 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } 1040 type Empty struct { 1041 // ServerResponse contains the HTTP response code and headers from the server. 1042 googleapi.ServerResponse `json:"-"` 1043 } 1044 1045 // Endpoint: Source or destination of the Connectivity Test. 1046 type Endpoint struct { 1047 // AppEngineVersion: An App Engine (https://cloud.google.com/appengine) 1048 // [service 1049 // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/ 1050 // apps.services.versions). 1051 AppEngineVersion *AppEngineVersionEndpoint `json:"appEngineVersion,omitempty"` 1052 // CloudFunction: A Cloud Function (https://cloud.google.com/functions). 1053 CloudFunction *CloudFunctionEndpoint `json:"cloudFunction,omitempty"` 1054 // CloudRunRevision: A Cloud Run (https://cloud.google.com/run) 1055 // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.rev 1056 // isions/get) 1057 CloudRunRevision *CloudRunRevisionEndpoint `json:"cloudRunRevision,omitempty"` 1058 // CloudSqlInstance: A Cloud SQL (https://cloud.google.com/sql) instance URI. 1059 CloudSqlInstance string `json:"cloudSqlInstance,omitempty"` 1060 // ForwardingRule: A forwarding rule and its corresponding IP address represent 1061 // the frontend configuration of a Google Cloud load balancer. Forwarding rules 1062 // are also used for protocol forwarding, Private Service Connect and other 1063 // network services to provide forwarding information in the control plane. 1064 // Format: projects/{project}/global/forwardingRules/{id} or 1065 // projects/{project}/regions/{region}/forwardingRules/{id} 1066 ForwardingRule string `json:"forwardingRule,omitempty"` 1067 // ForwardingRuleTarget: Output only. Specifies the type of the target of the 1068 // forwarding rule. 1069 // 1070 // Possible values: 1071 // "FORWARDING_RULE_TARGET_UNSPECIFIED" - Forwarding rule target is unknown. 1072 // "INSTANCE" - Compute Engine instance for protocol forwarding. 1073 // "LOAD_BALANCER" - Load Balancer. The specific type can be found from 1074 // load_balancer_type. 1075 // "VPN_GATEWAY" - Classic Cloud VPN Gateway. 1076 // "PSC" - Forwarding Rule is a Private Service Connect endpoint. 1077 ForwardingRuleTarget string `json:"forwardingRuleTarget,omitempty"` 1078 // GkeMasterCluster: A cluster URI for Google Kubernetes Engine master 1079 // (https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). 1080 GkeMasterCluster string `json:"gkeMasterCluster,omitempty"` 1081 // Instance: A Compute Engine instance URI. 1082 Instance string `json:"instance,omitempty"` 1083 // IpAddress: The IP address of the endpoint, which can be an external or 1084 // internal IP. 1085 IpAddress string `json:"ipAddress,omitempty"` 1086 // LoadBalancerId: Output only. ID of the load balancer the forwarding rule 1087 // points to. Empty for forwarding rules not related to load balancers. 1088 LoadBalancerId string `json:"loadBalancerId,omitempty"` 1089 // LoadBalancerType: Output only. Type of the load balancer the forwarding rule 1090 // points to. 1091 // 1092 // Possible values: 1093 // "LOAD_BALANCER_TYPE_UNSPECIFIED" - Forwarding rule points to a different 1094 // target than a load balancer or a load balancer type is unknown. 1095 // "HTTPS_ADVANCED_LOAD_BALANCER" - Global external HTTP(S) load balancer. 1096 // "HTTPS_LOAD_BALANCER" - Global external HTTP(S) load balancer (classic) 1097 // "REGIONAL_HTTPS_LOAD_BALANCER" - Regional external HTTP(S) load balancer. 1098 // "INTERNAL_HTTPS_LOAD_BALANCER" - Internal HTTP(S) load balancer. 1099 // "SSL_PROXY_LOAD_BALANCER" - External SSL proxy load balancer. 1100 // "TCP_PROXY_LOAD_BALANCER" - External TCP proxy load balancer. 1101 // "INTERNAL_TCP_PROXY_LOAD_BALANCER" - Internal regional TCP proxy load 1102 // balancer. 1103 // "NETWORK_LOAD_BALANCER" - External TCP/UDP Network load balancer. 1104 // "LEGACY_NETWORK_LOAD_BALANCER" - Target-pool based external TCP/UDP 1105 // Network load balancer. 1106 // "TCP_UDP_INTERNAL_LOAD_BALANCER" - Internal TCP/UDP load balancer. 1107 LoadBalancerType string `json:"loadBalancerType,omitempty"` 1108 // Network: A Compute Engine network URI. 1109 Network string `json:"network,omitempty"` 1110 // NetworkType: Type of the network where the endpoint is located. Applicable 1111 // only to source endpoint, as destination network type can be inferred from 1112 // the source. 1113 // 1114 // Possible values: 1115 // "NETWORK_TYPE_UNSPECIFIED" - Default type if unspecified. 1116 // "GCP_NETWORK" - A network hosted within Google Cloud. To receive more 1117 // detailed output, specify the URI for the source or destination network. 1118 // "NON_GCP_NETWORK" - A network hosted outside of Google Cloud. This can be 1119 // an on-premises network, or a network hosted by another cloud provider. 1120 NetworkType string `json:"networkType,omitempty"` 1121 // Port: The IP protocol port of the endpoint. Only applicable when protocol is 1122 // TCP or UDP. 1123 Port int64 `json:"port,omitempty"` 1124 // ProjectId: Project ID where the endpoint is located. The Project ID can be 1125 // derived from the URI if you provide a VM instance or network URI. The 1126 // following are two cases where you must provide the project ID: 1. Only the 1127 // IP address is specified, and the IP address is within a Google Cloud 1128 // project. 2. When you are using Shared VPC and the IP address that you 1129 // provide is from the service project. In this case, the network that the IP 1130 // address resides in is defined in the host project. 1131 ProjectId string `json:"projectId,omitempty"` 1132 // ForceSendFields is a list of field names (e.g. "AppEngineVersion") to 1133 // unconditionally include in API requests. By default, fields with empty or 1134 // default values are omitted from API requests. See 1135 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1136 // details. 1137 ForceSendFields []string `json:"-"` 1138 // NullFields is a list of field names (e.g. "AppEngineVersion") to include in 1139 // API requests with the JSON null value. By default, fields with empty values 1140 // are omitted from API requests. See 1141 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1142 NullFields []string `json:"-"` 1143 } 1144 1145 func (s *Endpoint) MarshalJSON() ([]byte, error) { 1146 type NoMethod Endpoint 1147 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1148 } 1149 1150 // EndpointInfo: For display only. The specification of the endpoints for the 1151 // test. EndpointInfo is derived from source and destination Endpoint and 1152 // validated by the backend data plane model. 1153 type EndpointInfo struct { 1154 // DestinationIp: Destination IP address. 1155 DestinationIp string `json:"destinationIp,omitempty"` 1156 // DestinationNetworkUri: URI of the network where this packet is sent to. 1157 DestinationNetworkUri string `json:"destinationNetworkUri,omitempty"` 1158 // DestinationPort: Destination port. Only valid when protocol is TCP or UDP. 1159 DestinationPort int64 `json:"destinationPort,omitempty"` 1160 // Protocol: IP protocol in string format, for example: "TCP", "UDP", "ICMP". 1161 Protocol string `json:"protocol,omitempty"` 1162 // SourceAgentUri: URI of the source telemetry agent this packet originates 1163 // from. 1164 SourceAgentUri string `json:"sourceAgentUri,omitempty"` 1165 // SourceIp: Source IP address. 1166 SourceIp string `json:"sourceIp,omitempty"` 1167 // SourceNetworkUri: URI of the network where this packet originates from. 1168 SourceNetworkUri string `json:"sourceNetworkUri,omitempty"` 1169 // SourcePort: Source port. Only valid when protocol is TCP or UDP. 1170 SourcePort int64 `json:"sourcePort,omitempty"` 1171 // ForceSendFields is a list of field names (e.g. "DestinationIp") to 1172 // unconditionally include in API requests. By default, fields with empty or 1173 // default values are omitted from API requests. See 1174 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1175 // details. 1176 ForceSendFields []string `json:"-"` 1177 // NullFields is a list of field names (e.g. "DestinationIp") to include in API 1178 // requests with the JSON null value. By default, fields with empty values are 1179 // omitted from API requests. See 1180 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1181 NullFields []string `json:"-"` 1182 } 1183 1184 func (s *EndpointInfo) MarshalJSON() ([]byte, error) { 1185 type NoMethod EndpointInfo 1186 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1187 } 1188 1189 // Expr: Represents a textual expression in the Common Expression Language 1190 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics 1191 // of CEL are documented at https://github.com/google/cel-spec. Example 1192 // (Comparison): title: "Summary size limit" description: "Determines if a 1193 // summary is less than 100 chars" expression: "document.summary.size() < 100" 1194 // Example (Equality): title: "Requestor is owner" description: "Determines if 1195 // requestor is the document owner" expression: "document.owner == 1196 // request.auth.claims.email" Example (Logic): title: "Public documents" 1197 // description: "Determine whether the document should be publicly visible" 1198 // expression: "document.type != 'private' && document.type != 'internal'" 1199 // Example (Data Manipulation): title: "Notification string" description: 1200 // "Create a notification string with a timestamp." expression: "'New message 1201 // received at ' + string(document.create_time)" The exact variables and 1202 // functions that may be referenced within an expression are determined by the 1203 // service that evaluates it. See the service documentation for additional 1204 // information. 1205 type Expr struct { 1206 // Description: Optional. Description of the expression. This is a longer text 1207 // which describes the expression, e.g. when hovered over it in a UI. 1208 Description string `json:"description,omitempty"` 1209 // Expression: Textual representation of an expression in Common Expression 1210 // Language syntax. 1211 Expression string `json:"expression,omitempty"` 1212 // Location: Optional. String indicating the location of the expression for 1213 // error reporting, e.g. a file name and a position in the file. 1214 Location string `json:"location,omitempty"` 1215 // Title: Optional. Title for the expression, i.e. a short string describing 1216 // its purpose. This can be used e.g. in UIs which allow to enter the 1217 // expression. 1218 Title string `json:"title,omitempty"` 1219 // ForceSendFields is a list of field names (e.g. "Description") to 1220 // unconditionally include in API requests. By default, fields with empty or 1221 // default values are omitted from API requests. See 1222 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1223 // details. 1224 ForceSendFields []string `json:"-"` 1225 // NullFields is a list of field names (e.g. "Description") to include in API 1226 // requests with the JSON null value. By default, fields with empty values are 1227 // omitted from API requests. See 1228 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1229 NullFields []string `json:"-"` 1230 } 1231 1232 func (s *Expr) MarshalJSON() ([]byte, error) { 1233 type NoMethod Expr 1234 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1235 } 1236 1237 // FirewallInfo: For display only. Metadata associated with a VPC firewall 1238 // rule, an implied VPC firewall rule, or a hierarchical firewall policy rule. 1239 type FirewallInfo struct { 1240 // Action: Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP 1241 Action string `json:"action,omitempty"` 1242 // Direction: Possible values: INGRESS, EGRESS 1243 Direction string `json:"direction,omitempty"` 1244 // DisplayName: The display name of the VPC firewall rule. This field is not 1245 // applicable to hierarchical firewall policy rules. 1246 DisplayName string `json:"displayName,omitempty"` 1247 // FirewallRuleType: The firewall rule's type. 1248 // 1249 // Possible values: 1250 // "FIREWALL_RULE_TYPE_UNSPECIFIED" - Unspecified type. 1251 // "HIERARCHICAL_FIREWALL_POLICY_RULE" - Hierarchical firewall policy rule. 1252 // For details, see [Hierarchical firewall policies 1253 // overview](https://cloud.google.com/vpc/docs/firewall-policies). 1254 // "VPC_FIREWALL_RULE" - VPC firewall rule. For details, see [VPC firewall 1255 // rules overview](https://cloud.google.com/vpc/docs/firewalls). 1256 // "IMPLIED_VPC_FIREWALL_RULE" - Implied VPC firewall rule. For details, see 1257 // [Implied 1258 // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). 1259 // "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE" - Implicit firewall rules 1260 // that are managed by serverless VPC access to allow ingress access. They are 1261 // not visible in the Google Cloud console. For details, see [VPC connector's 1262 // implicit 1263 // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#rest 1264 // rict-access). 1265 // "NETWORK_FIREWALL_POLICY_RULE" - Global network firewall policy rule. For 1266 // details, see [Network firewall 1267 // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). 1268 // "NETWORK_REGIONAL_FIREWALL_POLICY_RULE" - Regional network firewall policy 1269 // rule. For details, see [Regional network firewall 1270 // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). 1271 // "UNSUPPORTED_FIREWALL_POLICY_RULE" - Firewall policy rule containing 1272 // attributes not yet supported in Connectivity tests. Firewall analysis is 1273 // skipped if such a rule can potentially be matched. Please see the [list of 1274 // unsupported 1275 // configurations](https://cloud.google.com/network-intelligence-center/docs/con 1276 // nectivity-tests/concepts/overview#unsupported-configs). 1277 // "TRACKING_STATE" - Tracking state for response traffic created when 1278 // request traffic goes through allow firewall rule. For details, see [firewall 1279 // rules 1280 // specifications](https://cloud.google.com/firewall/docs/firewalls#specificatio 1281 // ns) 1282 FirewallRuleType string `json:"firewallRuleType,omitempty"` 1283 // NetworkUri: The URI of the VPC network that the firewall rule is associated 1284 // with. This field is not applicable to hierarchical firewall policy rules. 1285 NetworkUri string `json:"networkUri,omitempty"` 1286 // Policy: The hierarchical firewall policy that this rule is associated with. 1287 // This field is not applicable to VPC firewall rules. 1288 Policy string `json:"policy,omitempty"` 1289 // Priority: The priority of the firewall rule. 1290 Priority int64 `json:"priority,omitempty"` 1291 // TargetServiceAccounts: The target service accounts specified by the firewall 1292 // rule. 1293 TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` 1294 // TargetTags: The target tags defined by the VPC firewall rule. This field is 1295 // not applicable to hierarchical firewall policy rules. 1296 TargetTags []string `json:"targetTags,omitempty"` 1297 // Uri: The URI of the VPC firewall rule. This field is not applicable to 1298 // implied firewall rules or hierarchical firewall policy rules. 1299 Uri string `json:"uri,omitempty"` 1300 // ForceSendFields is a list of field names (e.g. "Action") to unconditionally 1301 // include in API requests. By default, fields with empty or default values are 1302 // omitted from API requests. See 1303 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1304 // details. 1305 ForceSendFields []string `json:"-"` 1306 // NullFields is a list of field names (e.g. "Action") to include in API 1307 // requests with the JSON null value. By default, fields with empty values are 1308 // omitted from API requests. See 1309 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1310 NullFields []string `json:"-"` 1311 } 1312 1313 func (s *FirewallInfo) MarshalJSON() ([]byte, error) { 1314 type NoMethod FirewallInfo 1315 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1316 } 1317 1318 // ForwardInfo: Details of the final state "forward" and associated resource. 1319 type ForwardInfo struct { 1320 // IpAddress: IP address of the target (if applicable). 1321 IpAddress string `json:"ipAddress,omitempty"` 1322 // ResourceUri: URI of the resource that the packet is forwarded to. 1323 ResourceUri string `json:"resourceUri,omitempty"` 1324 // Target: Target type where this packet is forwarded to. 1325 // 1326 // Possible values: 1327 // "TARGET_UNSPECIFIED" - Target not specified. 1328 // "PEERING_VPC" - Forwarded to a VPC peering network. 1329 // "VPN_GATEWAY" - Forwarded to a Cloud VPN gateway. 1330 // "INTERCONNECT" - Forwarded to a Cloud Interconnect connection. 1331 // "GKE_MASTER" - Forwarded to a Google Kubernetes Engine Container cluster 1332 // master. 1333 // "IMPORTED_CUSTOM_ROUTE_NEXT_HOP" - Forwarded to the next hop of a custom 1334 // route imported from a peering VPC. 1335 // "CLOUD_SQL_INSTANCE" - Forwarded to a Cloud SQL instance. 1336 // "ANOTHER_PROJECT" - Forwarded to a VPC network in another project. 1337 // "NCC_HUB" - Forwarded to an NCC Hub. 1338 // "ROUTER_APPLIANCE" - Forwarded to a router appliance. 1339 Target string `json:"target,omitempty"` 1340 // ForceSendFields is a list of field names (e.g. "IpAddress") to 1341 // unconditionally include in API requests. By default, fields with empty or 1342 // default values are omitted from API requests. See 1343 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1344 // details. 1345 ForceSendFields []string `json:"-"` 1346 // NullFields is a list of field names (e.g. "IpAddress") to include in API 1347 // requests with the JSON null value. By default, fields with empty values are 1348 // omitted from API requests. See 1349 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1350 NullFields []string `json:"-"` 1351 } 1352 1353 func (s *ForwardInfo) MarshalJSON() ([]byte, error) { 1354 type NoMethod ForwardInfo 1355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1356 } 1357 1358 // ForwardingRuleInfo: For display only. Metadata associated with a Compute 1359 // Engine forwarding rule. 1360 type ForwardingRuleInfo struct { 1361 // DisplayName: Name of a Compute Engine forwarding rule. 1362 DisplayName string `json:"displayName,omitempty"` 1363 // MatchedPortRange: Port range defined in the forwarding rule that matches the 1364 // test. 1365 MatchedPortRange string `json:"matchedPortRange,omitempty"` 1366 // MatchedProtocol: Protocol defined in the forwarding rule that matches the 1367 // test. 1368 MatchedProtocol string `json:"matchedProtocol,omitempty"` 1369 // NetworkUri: Network URI. Only valid for Internal Load Balancer. 1370 NetworkUri string `json:"networkUri,omitempty"` 1371 // Target: Target type of the forwarding rule. 1372 Target string `json:"target,omitempty"` 1373 // Uri: URI of a Compute Engine forwarding rule. 1374 Uri string `json:"uri,omitempty"` 1375 // Vip: VIP of the forwarding rule. 1376 Vip string `json:"vip,omitempty"` 1377 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1378 // unconditionally include in API requests. By default, fields with empty or 1379 // default values are omitted from API requests. See 1380 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1381 // details. 1382 ForceSendFields []string `json:"-"` 1383 // NullFields is a list of field names (e.g. "DisplayName") to include in API 1384 // requests with the JSON null value. By default, fields with empty values are 1385 // omitted from API requests. See 1386 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1387 NullFields []string `json:"-"` 1388 } 1389 1390 func (s *ForwardingRuleInfo) MarshalJSON() ([]byte, error) { 1391 type NoMethod ForwardingRuleInfo 1392 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1393 } 1394 1395 // GKEMasterInfo: For display only. Metadata associated with a Google 1396 // Kubernetes Engine (GKE) cluster master. 1397 type GKEMasterInfo struct { 1398 // ClusterNetworkUri: URI of a GKE cluster network. 1399 ClusterNetworkUri string `json:"clusterNetworkUri,omitempty"` 1400 // ClusterUri: URI of a GKE cluster. 1401 ClusterUri string `json:"clusterUri,omitempty"` 1402 // ExternalIp: External IP address of a GKE cluster master. 1403 ExternalIp string `json:"externalIp,omitempty"` 1404 // InternalIp: Internal IP address of a GKE cluster master. 1405 InternalIp string `json:"internalIp,omitempty"` 1406 // ForceSendFields is a list of field names (e.g. "ClusterNetworkUri") to 1407 // unconditionally include in API requests. By default, fields with empty or 1408 // default values are omitted from API requests. See 1409 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1410 // details. 1411 ForceSendFields []string `json:"-"` 1412 // NullFields is a list of field names (e.g. "ClusterNetworkUri") to include in 1413 // API requests with the JSON null value. By default, fields with empty values 1414 // are omitted from API requests. See 1415 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1416 NullFields []string `json:"-"` 1417 } 1418 1419 func (s *GKEMasterInfo) MarshalJSON() ([]byte, error) { 1420 type NoMethod GKEMasterInfo 1421 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1422 } 1423 1424 // GoogleServiceInfo: For display only. Details of a Google Service sending 1425 // packets to a VPC network. Although the source IP might be a publicly 1426 // routable address, some Google Services use special routes within Google 1427 // production infrastructure to reach Compute Engine Instances. 1428 // https://cloud.google.com/vpc/docs/routes#special_return_paths 1429 type GoogleServiceInfo struct { 1430 // GoogleServiceType: Recognized type of a Google Service. 1431 // 1432 // Possible values: 1433 // "GOOGLE_SERVICE_TYPE_UNSPECIFIED" - Unspecified Google Service. 1434 // "IAP" - Identity aware proxy. 1435 // https://cloud.google.com/iap/docs/using-tcp-forwarding 1436 // "GFE_PROXY_OR_HEALTH_CHECK_PROBER" - One of two services sharing IP 1437 // ranges: * Load Balancer proxy * Centralized Health Check prober 1438 // https://cloud.google.com/load-balancing/docs/firewall-rules 1439 // "CLOUD_DNS" - Connectivity from Cloud DNS to forwarding targets or 1440 // alternate name servers that use private routing. 1441 // https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules 1442 // https://cloud.google.com/dns/docs/policies#firewall-rules 1443 // "GOOGLE_API" - private.googleapis.com and restricted.googleapis.com 1444 // "GOOGLE_API_PSC" - Google API via Private Service Connect. 1445 // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis 1446 // "GOOGLE_API_VPC_SC" - Google API via VPC Service Controls. 1447 // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis 1448 GoogleServiceType string `json:"googleServiceType,omitempty"` 1449 // SourceIp: Source IP address. 1450 SourceIp string `json:"sourceIp,omitempty"` 1451 // ForceSendFields is a list of field names (e.g. "GoogleServiceType") to 1452 // unconditionally include in API requests. By default, fields with empty or 1453 // default values are omitted from API requests. See 1454 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1455 // details. 1456 ForceSendFields []string `json:"-"` 1457 // NullFields is a list of field names (e.g. "GoogleServiceType") to include in 1458 // API requests with the JSON null value. By default, fields with empty values 1459 // are omitted from API requests. See 1460 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1461 NullFields []string `json:"-"` 1462 } 1463 1464 func (s *GoogleServiceInfo) MarshalJSON() ([]byte, error) { 1465 type NoMethod GoogleServiceInfo 1466 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1467 } 1468 1469 // InstanceInfo: For display only. Metadata associated with a Compute Engine 1470 // instance. 1471 type InstanceInfo struct { 1472 // DisplayName: Name of a Compute Engine instance. 1473 DisplayName string `json:"displayName,omitempty"` 1474 // ExternalIp: External IP address of the network interface. 1475 ExternalIp string `json:"externalIp,omitempty"` 1476 // Interface: Name of the network interface of a Compute Engine instance. 1477 Interface string `json:"interface,omitempty"` 1478 // InternalIp: Internal IP address of the network interface. 1479 InternalIp string `json:"internalIp,omitempty"` 1480 // NetworkTags: Network tags configured on the instance. 1481 NetworkTags []string `json:"networkTags,omitempty"` 1482 // NetworkUri: URI of a Compute Engine network. 1483 NetworkUri string `json:"networkUri,omitempty"` 1484 // ServiceAccount: Service account authorized for the instance. 1485 ServiceAccount string `json:"serviceAccount,omitempty"` 1486 // Uri: URI of a Compute Engine instance. 1487 Uri string `json:"uri,omitempty"` 1488 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1489 // unconditionally include in API requests. By default, fields with empty or 1490 // default values are omitted from API requests. See 1491 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1492 // details. 1493 ForceSendFields []string `json:"-"` 1494 // NullFields is a list of field names (e.g. "DisplayName") to include in API 1495 // requests with the JSON null value. By default, fields with empty values are 1496 // omitted from API requests. See 1497 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1498 NullFields []string `json:"-"` 1499 } 1500 1501 func (s *InstanceInfo) MarshalJSON() ([]byte, error) { 1502 type NoMethod InstanceInfo 1503 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1504 } 1505 1506 // LatencyDistribution: Describes measured latency distribution. 1507 type LatencyDistribution struct { 1508 // LatencyPercentiles: Representative latency percentiles. 1509 LatencyPercentiles []*LatencyPercentile `json:"latencyPercentiles,omitempty"` 1510 // ForceSendFields is a list of field names (e.g. "LatencyPercentiles") to 1511 // unconditionally include in API requests. By default, fields with empty or 1512 // default values are omitted from API requests. See 1513 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1514 // details. 1515 ForceSendFields []string `json:"-"` 1516 // NullFields is a list of field names (e.g. "LatencyPercentiles") to include 1517 // in API requests with the JSON null value. By default, fields with empty 1518 // values are omitted from API requests. See 1519 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1520 NullFields []string `json:"-"` 1521 } 1522 1523 func (s *LatencyDistribution) MarshalJSON() ([]byte, error) { 1524 type NoMethod LatencyDistribution 1525 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1526 } 1527 1528 // LatencyPercentile: Latency percentile rank and value. 1529 type LatencyPercentile struct { 1530 // LatencyMicros: percent-th percentile of latency observed, in microseconds. 1531 // Fraction of percent/100 of samples have latency lower or equal to the value 1532 // of this field. 1533 LatencyMicros int64 `json:"latencyMicros,omitempty,string"` 1534 // Percent: Percentage of samples this data point applies to. 1535 Percent int64 `json:"percent,omitempty"` 1536 // ForceSendFields is a list of field names (e.g. "LatencyMicros") to 1537 // unconditionally include in API requests. By default, fields with empty or 1538 // default values are omitted from API requests. See 1539 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1540 // details. 1541 ForceSendFields []string `json:"-"` 1542 // NullFields is a list of field names (e.g. "LatencyMicros") to include in API 1543 // requests with the JSON null value. By default, fields with empty values are 1544 // omitted from API requests. See 1545 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1546 NullFields []string `json:"-"` 1547 } 1548 1549 func (s *LatencyPercentile) MarshalJSON() ([]byte, error) { 1550 type NoMethod LatencyPercentile 1551 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1552 } 1553 1554 // ListConnectivityTestsResponse: Response for the `ListConnectivityTests` 1555 // method. 1556 type ListConnectivityTestsResponse struct { 1557 // NextPageToken: Page token to fetch the next set of Connectivity Tests. 1558 NextPageToken string `json:"nextPageToken,omitempty"` 1559 // Resources: List of Connectivity Tests. 1560 Resources []*ConnectivityTest `json:"resources,omitempty"` 1561 // Unreachable: Locations that could not be reached (when querying all 1562 // locations with `-`). 1563 Unreachable []string `json:"unreachable,omitempty"` 1564 1565 // ServerResponse contains the HTTP response code and headers from the server. 1566 googleapi.ServerResponse `json:"-"` 1567 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1568 // unconditionally include in API requests. By default, fields with empty or 1569 // default values are omitted from API requests. See 1570 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1571 // details. 1572 ForceSendFields []string `json:"-"` 1573 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 1574 // requests with the JSON null value. By default, fields with empty values are 1575 // omitted from API requests. See 1576 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1577 NullFields []string `json:"-"` 1578 } 1579 1580 func (s *ListConnectivityTestsResponse) MarshalJSON() ([]byte, error) { 1581 type NoMethod ListConnectivityTestsResponse 1582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1583 } 1584 1585 // ListLocationsResponse: The response message for Locations.ListLocations. 1586 type ListLocationsResponse struct { 1587 // Locations: A list of locations that matches the specified filter in the 1588 // request. 1589 Locations []*Location `json:"locations,omitempty"` 1590 // NextPageToken: The standard List next-page token. 1591 NextPageToken string `json:"nextPageToken,omitempty"` 1592 1593 // ServerResponse contains the HTTP response code and headers from the server. 1594 googleapi.ServerResponse `json:"-"` 1595 // ForceSendFields is a list of field names (e.g. "Locations") to 1596 // unconditionally include in API requests. By default, fields with empty or 1597 // default values are omitted from API requests. See 1598 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1599 // details. 1600 ForceSendFields []string `json:"-"` 1601 // NullFields is a list of field names (e.g. "Locations") to include in API 1602 // requests with the JSON null value. By default, fields with empty values are 1603 // omitted from API requests. See 1604 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1605 NullFields []string `json:"-"` 1606 } 1607 1608 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 1609 type NoMethod ListLocationsResponse 1610 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1611 } 1612 1613 // ListOperationsResponse: The response message for Operations.ListOperations. 1614 type ListOperationsResponse struct { 1615 // NextPageToken: The standard List next-page token. 1616 NextPageToken string `json:"nextPageToken,omitempty"` 1617 // Operations: A list of operations that matches the specified filter in the 1618 // request. 1619 Operations []*Operation `json:"operations,omitempty"` 1620 1621 // ServerResponse contains the HTTP response code and headers from the server. 1622 googleapi.ServerResponse `json:"-"` 1623 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1624 // unconditionally include in API requests. By default, fields with empty or 1625 // default values are omitted from API requests. See 1626 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1627 // details. 1628 ForceSendFields []string `json:"-"` 1629 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 1630 // requests with the JSON null value. By default, fields with empty values are 1631 // omitted from API requests. See 1632 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1633 NullFields []string `json:"-"` 1634 } 1635 1636 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 1637 type NoMethod ListOperationsResponse 1638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1639 } 1640 1641 // LoadBalancerBackend: For display only. Metadata associated with a specific 1642 // load balancer backend. 1643 type LoadBalancerBackend struct { 1644 // DisplayName: Name of a Compute Engine instance or network endpoint. 1645 DisplayName string `json:"displayName,omitempty"` 1646 // HealthCheckAllowingFirewallRules: A list of firewall rule URIs allowing 1647 // probes from health check IP ranges. 1648 HealthCheckAllowingFirewallRules []string `json:"healthCheckAllowingFirewallRules,omitempty"` 1649 // HealthCheckBlockingFirewallRules: A list of firewall rule URIs blocking 1650 // probes from health check IP ranges. 1651 HealthCheckBlockingFirewallRules []string `json:"healthCheckBlockingFirewallRules,omitempty"` 1652 // HealthCheckFirewallState: State of the health check firewall configuration. 1653 // 1654 // Possible values: 1655 // "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED" - State is unspecified. Default 1656 // state if not populated. 1657 // "CONFIGURED" - There are configured firewall rules to allow health check 1658 // probes to the backend. 1659 // "MISCONFIGURED" - There are firewall rules configured to allow partial 1660 // health check ranges or block all health check ranges. If a health check 1661 // probe is sent from denied IP ranges, the health check to the backend will 1662 // fail. Then, the backend will be marked unhealthy and will not receive 1663 // traffic sent to the load balancer. 1664 HealthCheckFirewallState string `json:"healthCheckFirewallState,omitempty"` 1665 // Uri: URI of a Compute Engine instance or network endpoint. 1666 Uri string `json:"uri,omitempty"` 1667 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1668 // unconditionally include in API requests. By default, fields with empty or 1669 // default values are omitted from API requests. See 1670 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1671 // details. 1672 ForceSendFields []string `json:"-"` 1673 // NullFields is a list of field names (e.g. "DisplayName") to include in API 1674 // requests with the JSON null value. By default, fields with empty values are 1675 // omitted from API requests. See 1676 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1677 NullFields []string `json:"-"` 1678 } 1679 1680 func (s *LoadBalancerBackend) MarshalJSON() ([]byte, error) { 1681 type NoMethod LoadBalancerBackend 1682 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1683 } 1684 1685 // LoadBalancerBackendInfo: For display only. Metadata associated with the load 1686 // balancer backend. 1687 type LoadBalancerBackendInfo struct { 1688 // BackendBucketUri: URI of the backend bucket this backend targets (if 1689 // applicable). 1690 BackendBucketUri string `json:"backendBucketUri,omitempty"` 1691 // BackendServiceUri: URI of the backend service this backend belongs to (if 1692 // applicable). 1693 BackendServiceUri string `json:"backendServiceUri,omitempty"` 1694 // HealthCheckFirewallsConfigState: Output only. Health check firewalls 1695 // configuration state for the backend. This is a result of the static firewall 1696 // analysis (verifying that health check traffic from required IP ranges to the 1697 // backend is allowed or not). The backend might still be unhealthy even if 1698 // these firewalls are configured. Please refer to the documentation for more 1699 // information: https://cloud.google.com/load-balancing/docs/firewall-rules 1700 // 1701 // Possible values: 1702 // "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED" - Configuration state 1703 // unspecified. It usually means that the backend has no health check attached, 1704 // or there was an unexpected configuration error preventing Connectivity tests 1705 // from verifying health check configuration. 1706 // "FIREWALLS_CONFIGURED" - Firewall rules (policies) allowing health check 1707 // traffic from all required IP ranges to the backend are configured. 1708 // "FIREWALLS_PARTIALLY_CONFIGURED" - Firewall rules (policies) allow health 1709 // check traffic only from a part of required IP ranges. 1710 // "FIREWALLS_NOT_CONFIGURED" - Firewall rules (policies) deny health check 1711 // traffic from all required IP ranges to the backend. 1712 // "FIREWALLS_UNSUPPORTED" - The network contains firewall rules of 1713 // unsupported types, so Connectivity tests were not able to verify health 1714 // check configuration status. Please refer to the documentation for the list 1715 // of unsupported configurations: 1716 // https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs 1717 HealthCheckFirewallsConfigState string `json:"healthCheckFirewallsConfigState,omitempty"` 1718 // HealthCheckUri: URI of the health check attached to this backend (if 1719 // applicable). 1720 HealthCheckUri string `json:"healthCheckUri,omitempty"` 1721 // InstanceGroupUri: URI of the instance group this backend belongs to (if 1722 // applicable). 1723 InstanceGroupUri string `json:"instanceGroupUri,omitempty"` 1724 // InstanceUri: URI of the backend instance (if applicable). Populated for 1725 // instance group backends, and zonal NEG backends. 1726 InstanceUri string `json:"instanceUri,omitempty"` 1727 // Name: Display name of the backend. For example, it might be an instance name 1728 // for the instance group backends, or an IP address and port for zonal network 1729 // endpoint group backends. 1730 Name string `json:"name,omitempty"` 1731 // NetworkEndpointGroupUri: URI of the network endpoint group this backend 1732 // belongs to (if applicable). 1733 NetworkEndpointGroupUri string `json:"networkEndpointGroupUri,omitempty"` 1734 // PscGoogleApiTarget: PSC Google API target this PSC NEG backend targets (if 1735 // applicable). 1736 PscGoogleApiTarget string `json:"pscGoogleApiTarget,omitempty"` 1737 // PscServiceAttachmentUri: URI of the PSC service attachment this PSC NEG 1738 // backend targets (if applicable). 1739 PscServiceAttachmentUri string `json:"pscServiceAttachmentUri,omitempty"` 1740 // ForceSendFields is a list of field names (e.g. "BackendBucketUri") to 1741 // unconditionally include in API requests. By default, fields with empty or 1742 // default values are omitted from API requests. See 1743 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1744 // details. 1745 ForceSendFields []string `json:"-"` 1746 // NullFields is a list of field names (e.g. "BackendBucketUri") to include in 1747 // API requests with the JSON null value. By default, fields with empty values 1748 // are omitted from API requests. See 1749 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1750 NullFields []string `json:"-"` 1751 } 1752 1753 func (s *LoadBalancerBackendInfo) MarshalJSON() ([]byte, error) { 1754 type NoMethod LoadBalancerBackendInfo 1755 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1756 } 1757 1758 // LoadBalancerInfo: For display only. Metadata associated with a load 1759 // balancer. 1760 type LoadBalancerInfo struct { 1761 // BackendType: Type of load balancer's backend configuration. 1762 // 1763 // Possible values: 1764 // "BACKEND_TYPE_UNSPECIFIED" - Type is unspecified. 1765 // "BACKEND_SERVICE" - Backend Service as the load balancer's backend. 1766 // "TARGET_POOL" - Target Pool as the load balancer's backend. 1767 // "TARGET_INSTANCE" - Target Instance as the load balancer's backend. 1768 BackendType string `json:"backendType,omitempty"` 1769 // BackendUri: Backend configuration URI. 1770 BackendUri string `json:"backendUri,omitempty"` 1771 // Backends: Information for the loadbalancer backends. 1772 Backends []*LoadBalancerBackend `json:"backends,omitempty"` 1773 // HealthCheckUri: URI of the health check for the load balancer. Deprecated 1774 // and no longer populated as different load balancer backends might have 1775 // different health checks. 1776 HealthCheckUri string `json:"healthCheckUri,omitempty"` 1777 // LoadBalancerType: Type of the load balancer. 1778 // 1779 // Possible values: 1780 // "LOAD_BALANCER_TYPE_UNSPECIFIED" - Type is unspecified. 1781 // "INTERNAL_TCP_UDP" - Internal TCP/UDP load balancer. 1782 // "NETWORK_TCP_UDP" - Network TCP/UDP load balancer. 1783 // "HTTP_PROXY" - HTTP(S) proxy load balancer. 1784 // "TCP_PROXY" - TCP proxy load balancer. 1785 // "SSL_PROXY" - SSL proxy load balancer. 1786 LoadBalancerType string `json:"loadBalancerType,omitempty"` 1787 // ForceSendFields is a list of field names (e.g. "BackendType") to 1788 // unconditionally include in API requests. By default, fields with empty or 1789 // default values are omitted from API requests. See 1790 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1791 // details. 1792 ForceSendFields []string `json:"-"` 1793 // NullFields is a list of field names (e.g. "BackendType") to include in API 1794 // requests with the JSON null value. By default, fields with empty values are 1795 // omitted from API requests. See 1796 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1797 NullFields []string `json:"-"` 1798 } 1799 1800 func (s *LoadBalancerInfo) MarshalJSON() ([]byte, error) { 1801 type NoMethod LoadBalancerInfo 1802 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1803 } 1804 1805 // Location: A resource that represents a Google Cloud location. 1806 type Location struct { 1807 // DisplayName: The friendly name for this location, typically a nearby city 1808 // name. For example, "Tokyo". 1809 DisplayName string `json:"displayName,omitempty"` 1810 // Labels: Cross-service attributes for the location. For example 1811 // {"cloud.googleapis.com/region": "us-east1"} 1812 Labels map[string]string `json:"labels,omitempty"` 1813 // LocationId: The canonical id for this location. For example: "us-east1". 1814 LocationId string `json:"locationId,omitempty"` 1815 // Metadata: Service-specific metadata. For example the available capacity at 1816 // the given location. 1817 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1818 // Name: Resource name for the location, which may vary between 1819 // implementations. For example: 1820 // "projects/example-project/locations/us-east1" 1821 Name string `json:"name,omitempty"` 1822 1823 // ServerResponse contains the HTTP response code and headers from the server. 1824 googleapi.ServerResponse `json:"-"` 1825 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1826 // unconditionally include in API requests. By default, fields with empty or 1827 // default values are omitted from API requests. See 1828 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1829 // details. 1830 ForceSendFields []string `json:"-"` 1831 // NullFields is a list of field names (e.g. "DisplayName") to include in API 1832 // requests with the JSON null value. By default, fields with empty values are 1833 // omitted from API requests. See 1834 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1835 NullFields []string `json:"-"` 1836 } 1837 1838 func (s *Location) MarshalJSON() ([]byte, error) { 1839 type NoMethod Location 1840 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1841 } 1842 1843 // NatInfo: For display only. Metadata associated with NAT. 1844 type NatInfo struct { 1845 // NatGatewayName: The name of Cloud NAT Gateway. Only valid when type is 1846 // CLOUD_NAT. 1847 NatGatewayName string `json:"natGatewayName,omitempty"` 1848 // NetworkUri: URI of the network where NAT translation takes place. 1849 NetworkUri string `json:"networkUri,omitempty"` 1850 // NewDestinationIp: Destination IP address after NAT translation. 1851 NewDestinationIp string `json:"newDestinationIp,omitempty"` 1852 // NewDestinationPort: Destination port after NAT translation. Only valid when 1853 // protocol is TCP or UDP. 1854 NewDestinationPort int64 `json:"newDestinationPort,omitempty"` 1855 // NewSourceIp: Source IP address after NAT translation. 1856 NewSourceIp string `json:"newSourceIp,omitempty"` 1857 // NewSourcePort: Source port after NAT translation. Only valid when protocol 1858 // is TCP or UDP. 1859 NewSourcePort int64 `json:"newSourcePort,omitempty"` 1860 // OldDestinationIp: Destination IP address before NAT translation. 1861 OldDestinationIp string `json:"oldDestinationIp,omitempty"` 1862 // OldDestinationPort: Destination port before NAT translation. Only valid when 1863 // protocol is TCP or UDP. 1864 OldDestinationPort int64 `json:"oldDestinationPort,omitempty"` 1865 // OldSourceIp: Source IP address before NAT translation. 1866 OldSourceIp string `json:"oldSourceIp,omitempty"` 1867 // OldSourcePort: Source port before NAT translation. Only valid when protocol 1868 // is TCP or UDP. 1869 OldSourcePort int64 `json:"oldSourcePort,omitempty"` 1870 // Protocol: IP protocol in string format, for example: "TCP", "UDP", "ICMP". 1871 Protocol string `json:"protocol,omitempty"` 1872 // RouterUri: Uri of the Cloud Router. Only valid when type is CLOUD_NAT. 1873 RouterUri string `json:"routerUri,omitempty"` 1874 // Type: Type of NAT. 1875 // 1876 // Possible values: 1877 // "TYPE_UNSPECIFIED" - Type is unspecified. 1878 // "INTERNAL_TO_EXTERNAL" - From Compute Engine instance's internal address 1879 // to external address. 1880 // "EXTERNAL_TO_INTERNAL" - From Compute Engine instance's external address 1881 // to internal address. 1882 // "CLOUD_NAT" - Cloud NAT Gateway. 1883 // "PRIVATE_SERVICE_CONNECT" - Private service connect NAT. 1884 Type string `json:"type,omitempty"` 1885 // ForceSendFields is a list of field names (e.g. "NatGatewayName") to 1886 // unconditionally include in API requests. By default, fields with empty or 1887 // default values are omitted from API requests. See 1888 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1889 // details. 1890 ForceSendFields []string `json:"-"` 1891 // NullFields is a list of field names (e.g. "NatGatewayName") to include in 1892 // API requests with the JSON null value. By default, fields with empty values 1893 // are omitted from API requests. See 1894 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1895 NullFields []string `json:"-"` 1896 } 1897 1898 func (s *NatInfo) MarshalJSON() ([]byte, error) { 1899 type NoMethod NatInfo 1900 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1901 } 1902 1903 // NetworkInfo: For display only. Metadata associated with a Compute Engine 1904 // network. 1905 type NetworkInfo struct { 1906 // DisplayName: Name of a Compute Engine network. 1907 DisplayName string `json:"displayName,omitempty"` 1908 // MatchedIpRange: The IP range that matches the test. 1909 MatchedIpRange string `json:"matchedIpRange,omitempty"` 1910 // Uri: URI of a Compute Engine network. 1911 Uri string `json:"uri,omitempty"` 1912 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1913 // unconditionally include in API requests. By default, fields with empty or 1914 // default values are omitted from API requests. See 1915 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1916 // details. 1917 ForceSendFields []string `json:"-"` 1918 // NullFields is a list of field names (e.g. "DisplayName") to include in API 1919 // requests with the JSON null value. By default, fields with empty values are 1920 // omitted from API requests. See 1921 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1922 NullFields []string `json:"-"` 1923 } 1924 1925 func (s *NetworkInfo) MarshalJSON() ([]byte, error) { 1926 type NoMethod NetworkInfo 1927 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1928 } 1929 1930 // Operation: This resource represents a long-running operation that is the 1931 // result of a network API call. 1932 type Operation struct { 1933 // Done: If the value is `false`, it means the operation is still in progress. 1934 // If `true`, the operation is completed, and either `error` or `response` is 1935 // available. 1936 Done bool `json:"done,omitempty"` 1937 // Error: The error result of the operation in case of failure or cancellation. 1938 Error *Status `json:"error,omitempty"` 1939 // Metadata: Service-specific metadata associated with the operation. It 1940 // typically contains progress information and common metadata such as create 1941 // time. Some services might not provide such metadata. Any method that returns 1942 // a long-running operation should document the metadata type, if any. 1943 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1944 // Name: The server-assigned name, which is only unique within the same service 1945 // that originally returns it. If you use the default HTTP mapping, the `name` 1946 // should be a resource name ending with `operations/{unique_id}`. 1947 Name string `json:"name,omitempty"` 1948 // Response: The normal, successful response of the operation. If the original 1949 // method returns no data on success, such as `Delete`, the response is 1950 // `google.protobuf.Empty`. If the original method is standard 1951 // `Get`/`Create`/`Update`, the response should be the resource. For other 1952 // methods, the response should have the type `XxxResponse`, where `Xxx` is the 1953 // original method name. For example, if the original method name is 1954 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 1955 Response googleapi.RawMessage `json:"response,omitempty"` 1956 1957 // ServerResponse contains the HTTP response code and headers from the server. 1958 googleapi.ServerResponse `json:"-"` 1959 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally 1960 // include in API requests. By default, fields with empty or default values are 1961 // omitted from API requests. See 1962 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1963 // details. 1964 ForceSendFields []string `json:"-"` 1965 // NullFields is a list of field names (e.g. "Done") to include in API requests 1966 // with the JSON null value. By default, fields with empty values are omitted 1967 // from API requests. See 1968 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1969 NullFields []string `json:"-"` 1970 } 1971 1972 func (s *Operation) MarshalJSON() ([]byte, error) { 1973 type NoMethod Operation 1974 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1975 } 1976 1977 // OperationMetadata: Metadata describing an Operation 1978 type OperationMetadata struct { 1979 // ApiVersion: API version. 1980 ApiVersion string `json:"apiVersion,omitempty"` 1981 // CancelRequested: Specifies if cancellation was requested for the operation. 1982 CancelRequested bool `json:"cancelRequested,omitempty"` 1983 // CreateTime: The time the operation was created. 1984 CreateTime string `json:"createTime,omitempty"` 1985 // EndTime: The time the operation finished running. 1986 EndTime string `json:"endTime,omitempty"` 1987 // StatusDetail: Human-readable status of the operation, if any. 1988 StatusDetail string `json:"statusDetail,omitempty"` 1989 // Target: Target of the operation - for example 1990 // projects/project-1/locations/global/connectivityTests/test-1 1991 Target string `json:"target,omitempty"` 1992 // Verb: Name of the verb executed by the operation. 1993 Verb string `json:"verb,omitempty"` 1994 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1995 // unconditionally include in API requests. By default, fields with empty or 1996 // default values are omitted from API requests. See 1997 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1998 // details. 1999 ForceSendFields []string `json:"-"` 2000 // NullFields is a list of field names (e.g. "ApiVersion") to include in API 2001 // requests with the JSON null value. By default, fields with empty values are 2002 // omitted from API requests. See 2003 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2004 NullFields []string `json:"-"` 2005 } 2006 2007 func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 2008 type NoMethod OperationMetadata 2009 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2010 } 2011 2012 // Policy: An Identity and Access Management (IAM) policy, which specifies 2013 // access controls for Google Cloud resources. A `Policy` is a collection of 2014 // `bindings`. A `binding` binds one or more `members`, or principals, to a 2015 // single `role`. Principals can be user accounts, service accounts, Google 2016 // groups, and domains (such as G Suite). A `role` is a named list of 2017 // permissions; each `role` can be an IAM predefined role or a user-created 2018 // custom role. For some types of Google Cloud resources, a `binding` can also 2019 // specify a `condition`, which is a logical expression that allows access to a 2020 // resource only if the expression evaluates to `true`. A condition can add 2021 // constraints based on attributes of the request, the resource, or both. To 2022 // learn which resources support conditions in their IAM policies, see the IAM 2023 // documentation 2024 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON 2025 // example:** ``` { "bindings": [ { "role": 2026 // "roles/resourcemanager.organizationAdmin", "members": [ 2027 // "user:mike@example.com", "group:admins@example.com", "domain:google.com", 2028 // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": 2029 // "roles/resourcemanager.organizationViewer", "members": [ 2030 // "user:eve@example.com" ], "condition": { "title": "expirable access", 2031 // "description": "Does not grant access after Sep 2020", "expression": 2032 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": 2033 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - 2034 // members: - user:mike@example.com - group:admins@example.com - 2035 // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com 2036 // role: roles/resourcemanager.organizationAdmin - members: - 2037 // user:eve@example.com role: roles/resourcemanager.organizationViewer 2038 // condition: title: expirable access description: Does not grant access after 2039 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') 2040 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, 2041 // see the IAM documentation (https://cloud.google.com/iam/docs/). 2042 type Policy struct { 2043 // AuditConfigs: Specifies cloud audit logging configuration for this policy. 2044 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 2045 // Bindings: Associates a list of `members`, or principals, with a `role`. 2046 // Optionally, may specify a `condition` that determines how and when the 2047 // `bindings` are applied. Each of the `bindings` must contain at least one 2048 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; 2049 // up to 250 of these principals can be Google groups. Each occurrence of a 2050 // principal counts towards these limits. For example, if the `bindings` grant 2051 // 50 different roles to `user:alice@example.com`, and not to any other 2052 // principal, then you can add another 1,450 principals to the `bindings` in 2053 // the `Policy`. 2054 Bindings []*Binding `json:"bindings,omitempty"` 2055 // Etag: `etag` is used for optimistic concurrency control as a way to help 2056 // prevent simultaneous updates of a policy from overwriting each other. It is 2057 // strongly suggested that systems make use of the `etag` in the 2058 // read-modify-write cycle to perform policy updates in order to avoid race 2059 // conditions: An `etag` is returned in the response to `getIamPolicy`, and 2060 // systems are expected to put that etag in the request to `setIamPolicy` to 2061 // ensure that their change will be applied to the same version of the policy. 2062 // **Important:** If you use IAM Conditions, you must include the `etag` field 2063 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 2064 // you to overwrite a version `3` policy with a version `1` policy, and all of 2065 // the conditions in the version `3` policy are lost. 2066 Etag string `json:"etag,omitempty"` 2067 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and 2068 // `3`. Requests that specify an invalid value are rejected. Any operation that 2069 // affects conditional role bindings must specify version `3`. This requirement 2070 // applies to the following operations: * Getting a policy that includes a 2071 // conditional role binding * Adding a conditional role binding to a policy * 2072 // Changing a conditional role binding in a policy * Removing any role binding, 2073 // with or without a condition, from a policy that includes conditions 2074 // **Important:** If you use IAM Conditions, you must include the `etag` field 2075 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 2076 // you to overwrite a version `3` policy with a version `1` policy, and all of 2077 // the conditions in the version `3` policy are lost. If a policy does not 2078 // include any conditions, operations on that policy may specify any valid 2079 // version or leave the field unset. To learn which resources support 2080 // conditions in their IAM policies, see the IAM documentation 2081 // (https://cloud.google.com/iam/help/conditions/resource-policies). 2082 Version int64 `json:"version,omitempty"` 2083 2084 // ServerResponse contains the HTTP response code and headers from the server. 2085 googleapi.ServerResponse `json:"-"` 2086 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 2087 // unconditionally include in API requests. By default, fields with empty or 2088 // default values are omitted from API requests. See 2089 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2090 // details. 2091 ForceSendFields []string `json:"-"` 2092 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API 2093 // requests with the JSON null value. By default, fields with empty values are 2094 // omitted from API requests. See 2095 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2096 NullFields []string `json:"-"` 2097 } 2098 2099 func (s *Policy) MarshalJSON() ([]byte, error) { 2100 type NoMethod Policy 2101 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2102 } 2103 2104 // ProbingDetails: Results of active probing from the last run of the test. 2105 type ProbingDetails struct { 2106 // AbortCause: The reason probing was aborted. 2107 // 2108 // Possible values: 2109 // "PROBING_ABORT_CAUSE_UNSPECIFIED" - No reason was specified. 2110 // "PERMISSION_DENIED" - The user lacks permission to access some of the 2111 // network resources required to run the test. 2112 // "NO_SOURCE_LOCATION" - No valid source endpoint could be derived from the 2113 // request. 2114 AbortCause string `json:"abortCause,omitempty"` 2115 // DestinationEgressLocation: The EdgeLocation from which a packet destined 2116 // for/originating from the internet will egress/ingress the Google network. 2117 // This will only be populated for a connectivity test which has an internet 2118 // destination/source address. The absence of this field *must not* be used as 2119 // an indication that the destination/source is part of the Google network. 2120 DestinationEgressLocation *EdgeLocation `json:"destinationEgressLocation,omitempty"` 2121 // EndpointInfo: The source and destination endpoints derived from the test 2122 // input and used for active probing. 2123 EndpointInfo *EndpointInfo `json:"endpointInfo,omitempty"` 2124 // Error: Details about an internal failure or the cancellation of active 2125 // probing. 2126 Error *Status `json:"error,omitempty"` 2127 // ProbingLatency: Latency as measured by active probing in one direction: from 2128 // the source to the destination endpoint. 2129 ProbingLatency *LatencyDistribution `json:"probingLatency,omitempty"` 2130 // Result: The overall result of active probing. 2131 // 2132 // Possible values: 2133 // "PROBING_RESULT_UNSPECIFIED" - No result was specified. 2134 // "REACHABLE" - At least 95% of packets reached the destination. 2135 // "UNREACHABLE" - No packets reached the destination. 2136 // "REACHABILITY_INCONSISTENT" - Less than 95% of packets reached the 2137 // destination. 2138 // "UNDETERMINED" - Reachability could not be determined. Possible reasons 2139 // are: * The user lacks permission to access some of the network resources 2140 // required to run the test. * No valid source endpoint could be derived from 2141 // the request. * An internal error occurred. 2142 Result string `json:"result,omitempty"` 2143 // SentProbeCount: Number of probes sent. 2144 SentProbeCount int64 `json:"sentProbeCount,omitempty"` 2145 // SuccessfulProbeCount: Number of probes that reached the destination. 2146 SuccessfulProbeCount int64 `json:"successfulProbeCount,omitempty"` 2147 // VerifyTime: The time that reachability was assessed through active probing. 2148 VerifyTime string `json:"verifyTime,omitempty"` 2149 // ForceSendFields is a list of field names (e.g. "AbortCause") to 2150 // unconditionally include in API requests. By default, fields with empty or 2151 // default values are omitted from API requests. See 2152 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2153 // details. 2154 ForceSendFields []string `json:"-"` 2155 // NullFields is a list of field names (e.g. "AbortCause") to include in API 2156 // requests with the JSON null value. By default, fields with empty values are 2157 // omitted from API requests. See 2158 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2159 NullFields []string `json:"-"` 2160 } 2161 2162 func (s *ProbingDetails) MarshalJSON() ([]byte, error) { 2163 type NoMethod ProbingDetails 2164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2165 } 2166 2167 // ProxyConnectionInfo: For display only. Metadata associated with 2168 // ProxyConnection. 2169 type ProxyConnectionInfo struct { 2170 // NetworkUri: URI of the network where connection is proxied. 2171 NetworkUri string `json:"networkUri,omitempty"` 2172 // NewDestinationIp: Destination IP address of a new connection. 2173 NewDestinationIp string `json:"newDestinationIp,omitempty"` 2174 // NewDestinationPort: Destination port of a new connection. Only valid when 2175 // protocol is TCP or UDP. 2176 NewDestinationPort int64 `json:"newDestinationPort,omitempty"` 2177 // NewSourceIp: Source IP address of a new connection. 2178 NewSourceIp string `json:"newSourceIp,omitempty"` 2179 // NewSourcePort: Source port of a new connection. Only valid when protocol is 2180 // TCP or UDP. 2181 NewSourcePort int64 `json:"newSourcePort,omitempty"` 2182 // OldDestinationIp: Destination IP address of an original connection 2183 OldDestinationIp string `json:"oldDestinationIp,omitempty"` 2184 // OldDestinationPort: Destination port of an original connection. Only valid 2185 // when protocol is TCP or UDP. 2186 OldDestinationPort int64 `json:"oldDestinationPort,omitempty"` 2187 // OldSourceIp: Source IP address of an original connection. 2188 OldSourceIp string `json:"oldSourceIp,omitempty"` 2189 // OldSourcePort: Source port of an original connection. Only valid when 2190 // protocol is TCP or UDP. 2191 OldSourcePort int64 `json:"oldSourcePort,omitempty"` 2192 // Protocol: IP protocol in string format, for example: "TCP", "UDP", "ICMP". 2193 Protocol string `json:"protocol,omitempty"` 2194 // SubnetUri: Uri of proxy subnet. 2195 SubnetUri string `json:"subnetUri,omitempty"` 2196 // ForceSendFields is a list of field names (e.g. "NetworkUri") to 2197 // unconditionally include in API requests. By default, fields with empty or 2198 // default values are omitted from API requests. See 2199 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2200 // details. 2201 ForceSendFields []string `json:"-"` 2202 // NullFields is a list of field names (e.g. "NetworkUri") to include in API 2203 // requests with the JSON null value. By default, fields with empty values are 2204 // omitted from API requests. See 2205 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2206 NullFields []string `json:"-"` 2207 } 2208 2209 func (s *ProxyConnectionInfo) MarshalJSON() ([]byte, error) { 2210 type NoMethod ProxyConnectionInfo 2211 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2212 } 2213 2214 // ReachabilityDetails: Results of the configuration analysis from the last run 2215 // of the test. 2216 type ReachabilityDetails struct { 2217 // Error: The details of a failure or a cancellation of reachability analysis. 2218 Error *Status `json:"error,omitempty"` 2219 // Result: The overall result of the test's configuration analysis. 2220 // 2221 // Possible values: 2222 // "RESULT_UNSPECIFIED" - No result was specified. 2223 // "REACHABLE" - Possible scenarios are: * The configuration analysis 2224 // determined that a packet originating from the source is expected to reach 2225 // the destination. * The analysis didn't complete because the user lacks 2226 // permission for some of the resources in the trace. However, at the time the 2227 // user's permission became insufficient, the trace had been successful so far. 2228 // "UNREACHABLE" - A packet originating from the source is expected to be 2229 // dropped before reaching the destination. 2230 // "AMBIGUOUS" - The source and destination endpoints do not uniquely 2231 // identify the test location in the network, and the reachability result 2232 // contains multiple traces. For some traces, a packet could be delivered, and 2233 // for others, it would not be. This result is also assigned to configuration 2234 // analysis of return path if on its own it should be REACHABLE, but 2235 // configuration analysis of forward path is AMBIGUOUS. 2236 // "UNDETERMINED" - The configuration analysis did not complete. Possible 2237 // reasons are: * A permissions error occurred--for example, the user might not 2238 // have read permission for all of the resources named in the test. * An 2239 // internal error occurred. * The analyzer received an invalid or unsupported 2240 // argument or was unable to identify a known endpoint. 2241 Result string `json:"result,omitempty"` 2242 // Traces: Result may contain a list of traces if a test has multiple possible 2243 // paths in the network, such as when destination endpoint is a load balancer 2244 // with multiple backends. 2245 Traces []*Trace `json:"traces,omitempty"` 2246 // VerifyTime: The time of the configuration analysis. 2247 VerifyTime string `json:"verifyTime,omitempty"` 2248 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally 2249 // include in API requests. By default, fields with empty or default values are 2250 // omitted from API requests. See 2251 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2252 // details. 2253 ForceSendFields []string `json:"-"` 2254 // NullFields is a list of field names (e.g. "Error") to include in API 2255 // requests with the JSON null value. By default, fields with empty values are 2256 // omitted from API requests. See 2257 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2258 NullFields []string `json:"-"` 2259 } 2260 2261 func (s *ReachabilityDetails) MarshalJSON() ([]byte, error) { 2262 type NoMethod ReachabilityDetails 2263 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2264 } 2265 2266 // RerunConnectivityTestRequest: Request for the `RerunConnectivityTest` 2267 // method. 2268 type RerunConnectivityTestRequest struct { 2269 } 2270 2271 // RouteInfo: For display only. Metadata associated with a Compute Engine 2272 // route. 2273 type RouteInfo struct { 2274 // DestIpRange: Destination IP range of the route. 2275 DestIpRange string `json:"destIpRange,omitempty"` 2276 // DestPortRanges: Destination port ranges of the route. Policy based routes 2277 // only. 2278 DestPortRanges []string `json:"destPortRanges,omitempty"` 2279 // DisplayName: Name of a route. 2280 DisplayName string `json:"displayName,omitempty"` 2281 // InstanceTags: Instance tags of the route. 2282 InstanceTags []string `json:"instanceTags,omitempty"` 2283 // NccHubUri: URI of a NCC Hub. NCC_HUB routes only. 2284 NccHubUri string `json:"nccHubUri,omitempty"` 2285 // NccSpokeUri: URI of a NCC Spoke. NCC_HUB routes only. 2286 NccSpokeUri string `json:"nccSpokeUri,omitempty"` 2287 // NetworkUri: URI of a Compute Engine network. NETWORK routes only. 2288 NetworkUri string `json:"networkUri,omitempty"` 2289 // NextHop: Next hop of the route. 2290 NextHop string `json:"nextHop,omitempty"` 2291 // NextHopType: Type of next hop. 2292 // 2293 // Possible values: 2294 // "NEXT_HOP_TYPE_UNSPECIFIED" - Unspecified type. Default value. 2295 // "NEXT_HOP_IP" - Next hop is an IP address. 2296 // "NEXT_HOP_INSTANCE" - Next hop is a Compute Engine instance. 2297 // "NEXT_HOP_NETWORK" - Next hop is a VPC network gateway. 2298 // "NEXT_HOP_PEERING" - Next hop is a peering VPC. 2299 // "NEXT_HOP_INTERCONNECT" - Next hop is an interconnect. 2300 // "NEXT_HOP_VPN_TUNNEL" - Next hop is a VPN tunnel. 2301 // "NEXT_HOP_VPN_GATEWAY" - Next hop is a VPN gateway. This scenario only 2302 // happens when tracing connectivity from an on-premises network to Google 2303 // Cloud through a VPN. The analysis simulates a packet departing from the 2304 // on-premises network through a VPN tunnel and arriving at a Cloud VPN 2305 // gateway. 2306 // "NEXT_HOP_INTERNET_GATEWAY" - Next hop is an internet gateway. 2307 // "NEXT_HOP_BLACKHOLE" - Next hop is blackhole; that is, the next hop either 2308 // does not exist or is not running. 2309 // "NEXT_HOP_ILB" - Next hop is the forwarding rule of an Internal Load 2310 // Balancer. 2311 // "NEXT_HOP_ROUTER_APPLIANCE" - Next hop is a [router appliance 2312 // instance](https://cloud.google.com/network-connectivity/docs/network-connecti 2313 // vity-center/concepts/ra-overview). 2314 // "NEXT_HOP_NCC_HUB" - Next hop is an NCC hub. 2315 NextHopType string `json:"nextHopType,omitempty"` 2316 // Priority: Priority of the route. 2317 Priority int64 `json:"priority,omitempty"` 2318 // Protocols: Protocols of the route. Policy based routes only. 2319 Protocols []string `json:"protocols,omitempty"` 2320 // RouteScope: Indicates where route is applicable. 2321 // 2322 // Possible values: 2323 // "ROUTE_SCOPE_UNSPECIFIED" - Unspecified scope. Default value. 2324 // "NETWORK" - Route is applicable to packets in Network. 2325 // "NCC_HUB" - Route is applicable to packets using NCC Hub's routing table. 2326 RouteScope string `json:"routeScope,omitempty"` 2327 // RouteType: Type of route. 2328 // 2329 // Possible values: 2330 // "ROUTE_TYPE_UNSPECIFIED" - Unspecified type. Default value. 2331 // "SUBNET" - Route is a subnet route automatically created by the system. 2332 // "STATIC" - Static route created by the user, including the default route 2333 // to the internet. 2334 // "DYNAMIC" - Dynamic route exchanged between BGP peers. 2335 // "PEERING_SUBNET" - A subnet route received from peering network. 2336 // "PEERING_STATIC" - A static route received from peering network. 2337 // "PEERING_DYNAMIC" - A dynamic route received from peering network. 2338 // "POLICY_BASED" - Policy based route. 2339 RouteType string `json:"routeType,omitempty"` 2340 // SrcIpRange: Source IP address range of the route. Policy based routes only. 2341 SrcIpRange string `json:"srcIpRange,omitempty"` 2342 // SrcPortRanges: Source port ranges of the route. Policy based routes only. 2343 SrcPortRanges []string `json:"srcPortRanges,omitempty"` 2344 // Uri: URI of a route. Dynamic, peering static and peering dynamic routes do 2345 // not have an URI. Advertised route from Google Cloud VPC to on-premises 2346 // network also does not have an URI. 2347 Uri string `json:"uri,omitempty"` 2348 // ForceSendFields is a list of field names (e.g. "DestIpRange") to 2349 // unconditionally include in API requests. By default, fields with empty or 2350 // default values are omitted from API requests. See 2351 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2352 // details. 2353 ForceSendFields []string `json:"-"` 2354 // NullFields is a list of field names (e.g. "DestIpRange") to include in API 2355 // requests with the JSON null value. By default, fields with empty values are 2356 // omitted from API requests. See 2357 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2358 NullFields []string `json:"-"` 2359 } 2360 2361 func (s *RouteInfo) MarshalJSON() ([]byte, error) { 2362 type NoMethod RouteInfo 2363 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2364 } 2365 2366 // SetIamPolicyRequest: Request message for `SetIamPolicy` method. 2367 type SetIamPolicyRequest struct { 2368 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The 2369 // size of the policy is limited to a few 10s of KB. An empty policy is a valid 2370 // policy but certain Google Cloud services (such as Projects) might reject 2371 // them. 2372 Policy *Policy `json:"policy,omitempty"` 2373 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to 2374 // modify. Only the fields in the mask will be modified. If no mask is 2375 // provided, the following default mask is used: `paths: "bindings, etag" 2376 UpdateMask string `json:"updateMask,omitempty"` 2377 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally 2378 // include in API requests. By default, fields with empty or default values are 2379 // omitted from API requests. See 2380 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2381 // details. 2382 ForceSendFields []string `json:"-"` 2383 // NullFields is a list of field names (e.g. "Policy") to include in API 2384 // requests with the JSON null value. By default, fields with empty values are 2385 // omitted from API requests. See 2386 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2387 NullFields []string `json:"-"` 2388 } 2389 2390 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 2391 type NoMethod SetIamPolicyRequest 2392 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2393 } 2394 2395 // Status: The `Status` type defines a logical error model that is suitable for 2396 // different programming environments, including REST APIs and RPC APIs. It is 2397 // used by gRPC (https://github.com/grpc). Each `Status` message contains three 2398 // pieces of data: error code, error message, and error details. You can find 2399 // out more about this error model and how to work with it in the API Design 2400 // Guide (https://cloud.google.com/apis/design/errors). 2401 type Status struct { 2402 // Code: The status code, which should be an enum value of google.rpc.Code. 2403 Code int64 `json:"code,omitempty"` 2404 // Details: A list of messages that carry the error details. There is a common 2405 // set of message types for APIs to use. 2406 Details []googleapi.RawMessage `json:"details,omitempty"` 2407 // Message: A developer-facing error message, which should be in English. Any 2408 // user-facing error message should be localized and sent in the 2409 // google.rpc.Status.details field, or localized by the client. 2410 Message string `json:"message,omitempty"` 2411 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 2412 // include in API requests. By default, fields with empty or default values are 2413 // omitted from API requests. See 2414 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2415 // details. 2416 ForceSendFields []string `json:"-"` 2417 // NullFields is a list of field names (e.g. "Code") to include in API requests 2418 // with the JSON null value. By default, fields with empty values are omitted 2419 // from API requests. See 2420 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2421 NullFields []string `json:"-"` 2422 } 2423 2424 func (s *Status) MarshalJSON() ([]byte, error) { 2425 type NoMethod Status 2426 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2427 } 2428 2429 // Step: A simulated forwarding path is composed of multiple steps. Each step 2430 // has a well-defined state and an associated configuration. 2431 type Step struct { 2432 // Abort: Display information of the final state "abort" and reason. 2433 Abort *AbortInfo `json:"abort,omitempty"` 2434 // AppEngineVersion: Display information of an App Engine service version. 2435 AppEngineVersion *AppEngineVersionInfo `json:"appEngineVersion,omitempty"` 2436 // CausesDrop: This is a step that leads to the final state Drop. 2437 CausesDrop bool `json:"causesDrop,omitempty"` 2438 // CloudFunction: Display information of a Cloud Function. 2439 CloudFunction *CloudFunctionInfo `json:"cloudFunction,omitempty"` 2440 // CloudRunRevision: Display information of a Cloud Run revision. 2441 CloudRunRevision *CloudRunRevisionInfo `json:"cloudRunRevision,omitempty"` 2442 // CloudSqlInstance: Display information of a Cloud SQL instance. 2443 CloudSqlInstance *CloudSQLInstanceInfo `json:"cloudSqlInstance,omitempty"` 2444 // Deliver: Display information of the final state "deliver" and reason. 2445 Deliver *DeliverInfo `json:"deliver,omitempty"` 2446 // Description: A description of the step. Usually this is a summary of the 2447 // state. 2448 Description string `json:"description,omitempty"` 2449 // Drop: Display information of the final state "drop" and reason. 2450 Drop *DropInfo `json:"drop,omitempty"` 2451 // Endpoint: Display information of the source and destination under analysis. 2452 // The endpoint information in an intermediate state may differ with the 2453 // initial input, as it might be modified by state like NAT, or Connection 2454 // Proxy. 2455 Endpoint *EndpointInfo `json:"endpoint,omitempty"` 2456 // Firewall: Display information of a Compute Engine firewall rule. 2457 Firewall *FirewallInfo `json:"firewall,omitempty"` 2458 // Forward: Display information of the final state "forward" and reason. 2459 Forward *ForwardInfo `json:"forward,omitempty"` 2460 // ForwardingRule: Display information of a Compute Engine forwarding rule. 2461 ForwardingRule *ForwardingRuleInfo `json:"forwardingRule,omitempty"` 2462 // GkeMaster: Display information of a Google Kubernetes Engine cluster master. 2463 GkeMaster *GKEMasterInfo `json:"gkeMaster,omitempty"` 2464 // GoogleService: Display information of a Google service 2465 GoogleService *GoogleServiceInfo `json:"googleService,omitempty"` 2466 // Instance: Display information of a Compute Engine instance. 2467 Instance *InstanceInfo `json:"instance,omitempty"` 2468 // LoadBalancer: Display information of the load balancers. Deprecated in favor 2469 // of the `load_balancer_backend_info` field, not used in new tests. 2470 LoadBalancer *LoadBalancerInfo `json:"loadBalancer,omitempty"` 2471 // LoadBalancerBackendInfo: Display information of a specific load balancer 2472 // backend. 2473 LoadBalancerBackendInfo *LoadBalancerBackendInfo `json:"loadBalancerBackendInfo,omitempty"` 2474 // Nat: Display information of a NAT. 2475 Nat *NatInfo `json:"nat,omitempty"` 2476 // Network: Display information of a Google Cloud network. 2477 Network *NetworkInfo `json:"network,omitempty"` 2478 // ProjectId: Project ID that contains the configuration this step is 2479 // validating. 2480 ProjectId string `json:"projectId,omitempty"` 2481 // ProxyConnection: Display information of a ProxyConnection. 2482 ProxyConnection *ProxyConnectionInfo `json:"proxyConnection,omitempty"` 2483 // Route: Display information of a Compute Engine route. 2484 Route *RouteInfo `json:"route,omitempty"` 2485 // State: Each step is in one of the pre-defined states. 2486 // 2487 // Possible values: 2488 // "STATE_UNSPECIFIED" - Unspecified state. 2489 // "START_FROM_INSTANCE" - Initial state: packet originating from a Compute 2490 // Engine instance. An InstanceInfo is populated with starting instance 2491 // information. 2492 // "START_FROM_INTERNET" - Initial state: packet originating from the 2493 // internet. The endpoint information is populated. 2494 // "START_FROM_GOOGLE_SERVICE" - Initial state: packet originating from a 2495 // Google service. The google_service information is populated. 2496 // "START_FROM_PRIVATE_NETWORK" - Initial state: packet originating from a 2497 // VPC or on-premises network with internal source IP. If the source is a VPC 2498 // network visible to the user, a NetworkInfo is populated with details of the 2499 // network. 2500 // "START_FROM_GKE_MASTER" - Initial state: packet originating from a Google 2501 // Kubernetes Engine cluster master. A GKEMasterInfo is populated with starting 2502 // instance information. 2503 // "START_FROM_CLOUD_SQL_INSTANCE" - Initial state: packet originating from a 2504 // Cloud SQL instance. A CloudSQLInstanceInfo is populated with starting 2505 // instance information. 2506 // "START_FROM_CLOUD_FUNCTION" - Initial state: packet originating from a 2507 // Cloud Function. A CloudFunctionInfo is populated with starting function 2508 // information. 2509 // "START_FROM_APP_ENGINE_VERSION" - Initial state: packet originating from 2510 // an App Engine service version. An AppEngineVersionInfo is populated with 2511 // starting version information. 2512 // "START_FROM_CLOUD_RUN_REVISION" - Initial state: packet originating from a 2513 // Cloud Run revision. A CloudRunRevisionInfo is populated with starting 2514 // revision information. 2515 // "START_FROM_STORAGE_BUCKET" - Initial state: packet originating from a 2516 // Storage Bucket. Used only for return traces. The storage_bucket information 2517 // is populated. 2518 // "START_FROM_PSC_PUBLISHED_SERVICE" - Initial state: packet originating 2519 // from a published service that uses Private Service Connect. Used only for 2520 // return traces. 2521 // "APPLY_INGRESS_FIREWALL_RULE" - Config checking state: verify ingress 2522 // firewall rule. 2523 // "APPLY_EGRESS_FIREWALL_RULE" - Config checking state: verify egress 2524 // firewall rule. 2525 // "APPLY_ROUTE" - Config checking state: verify route. 2526 // "APPLY_FORWARDING_RULE" - Config checking state: match forwarding rule. 2527 // "ANALYZE_LOAD_BALANCER_BACKEND" - Config checking state: verify load 2528 // balancer backend configuration. 2529 // "SPOOFING_APPROVED" - Config checking state: packet sent or received under 2530 // foreign IP address and allowed. 2531 // "ARRIVE_AT_INSTANCE" - Forwarding state: arriving at a Compute Engine 2532 // instance. 2533 // "ARRIVE_AT_INTERNAL_LOAD_BALANCER" - Forwarding state: arriving at a 2534 // Compute Engine internal load balancer. Deprecated in favor of the 2535 // `ANALYZE_LOAD_BALANCER_BACKEND` state, not used in new tests. 2536 // "ARRIVE_AT_EXTERNAL_LOAD_BALANCER" - Forwarding state: arriving at a 2537 // Compute Engine external load balancer. Deprecated in favor of the 2538 // `ANALYZE_LOAD_BALANCER_BACKEND` state, not used in new tests. 2539 // "ARRIVE_AT_VPN_GATEWAY" - Forwarding state: arriving at a Cloud VPN 2540 // gateway. 2541 // "ARRIVE_AT_VPN_TUNNEL" - Forwarding state: arriving at a Cloud VPN tunnel. 2542 // "ARRIVE_AT_VPC_CONNECTOR" - Forwarding state: arriving at a VPC connector. 2543 // "NAT" - Transition state: packet header translated. 2544 // "PROXY_CONNECTION" - Transition state: original connection is terminated 2545 // and a new proxied connection is initiated. 2546 // "DELIVER" - Final state: packet could be delivered. 2547 // "DROP" - Final state: packet could be dropped. 2548 // "FORWARD" - Final state: packet could be forwarded to a network with an 2549 // unknown configuration. 2550 // "ABORT" - Final state: analysis is aborted. 2551 // "VIEWER_PERMISSION_MISSING" - Special state: viewer of the test result 2552 // does not have permission to see the configuration in this step. 2553 State string `json:"state,omitempty"` 2554 // StorageBucket: Display information of a Storage Bucket. Used only for return 2555 // traces. 2556 StorageBucket *StorageBucketInfo `json:"storageBucket,omitempty"` 2557 // VpcConnector: Display information of a VPC connector. 2558 VpcConnector *VpcConnectorInfo `json:"vpcConnector,omitempty"` 2559 // VpnGateway: Display information of a Compute Engine VPN gateway. 2560 VpnGateway *VpnGatewayInfo `json:"vpnGateway,omitempty"` 2561 // VpnTunnel: Display information of a Compute Engine VPN tunnel. 2562 VpnTunnel *VpnTunnelInfo `json:"vpnTunnel,omitempty"` 2563 // ForceSendFields is a list of field names (e.g. "Abort") to unconditionally 2564 // include in API requests. By default, fields with empty or default values are 2565 // omitted from API requests. See 2566 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2567 // details. 2568 ForceSendFields []string `json:"-"` 2569 // NullFields is a list of field names (e.g. "Abort") to include in API 2570 // requests with the JSON null value. By default, fields with empty values are 2571 // omitted from API requests. See 2572 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2573 NullFields []string `json:"-"` 2574 } 2575 2576 func (s *Step) MarshalJSON() ([]byte, error) { 2577 type NoMethod Step 2578 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2579 } 2580 2581 // StorageBucketInfo: For display only. Metadata associated with Storage 2582 // Bucket. 2583 type StorageBucketInfo struct { 2584 // Bucket: Cloud Storage Bucket name. 2585 Bucket string `json:"bucket,omitempty"` 2586 // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally 2587 // include in API requests. By default, fields with empty or default values are 2588 // omitted from API requests. See 2589 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2590 // details. 2591 ForceSendFields []string `json:"-"` 2592 // NullFields is a list of field names (e.g. "Bucket") to include in API 2593 // requests with the JSON null value. By default, fields with empty values are 2594 // omitted from API requests. See 2595 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2596 NullFields []string `json:"-"` 2597 } 2598 2599 func (s *StorageBucketInfo) MarshalJSON() ([]byte, error) { 2600 type NoMethod StorageBucketInfo 2601 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2602 } 2603 2604 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method. 2605 type TestIamPermissionsRequest struct { 2606 // Permissions: The set of permissions to check for the `resource`. Permissions 2607 // with wildcards (such as `*` or `storage.*`) are not allowed. For more 2608 // information see IAM Overview 2609 // (https://cloud.google.com/iam/docs/overview#permissions). 2610 Permissions []string `json:"permissions,omitempty"` 2611 // ForceSendFields is a list of field names (e.g. "Permissions") to 2612 // unconditionally include in API requests. By default, fields with empty or 2613 // default values are omitted from API requests. See 2614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2615 // details. 2616 ForceSendFields []string `json:"-"` 2617 // NullFields is a list of field names (e.g. "Permissions") to include in API 2618 // requests with the JSON null value. By default, fields with empty values are 2619 // omitted from API requests. See 2620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2621 NullFields []string `json:"-"` 2622 } 2623 2624 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 2625 type NoMethod TestIamPermissionsRequest 2626 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2627 } 2628 2629 // TestIamPermissionsResponse: Response message for `TestIamPermissions` 2630 // method. 2631 type TestIamPermissionsResponse struct { 2632 // Permissions: A subset of `TestPermissionsRequest.permissions` that the 2633 // caller is allowed. 2634 Permissions []string `json:"permissions,omitempty"` 2635 2636 // ServerResponse contains the HTTP response code and headers from the server. 2637 googleapi.ServerResponse `json:"-"` 2638 // ForceSendFields is a list of field names (e.g. "Permissions") to 2639 // unconditionally include in API requests. By default, fields with empty or 2640 // default values are omitted from API requests. See 2641 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2642 // details. 2643 ForceSendFields []string `json:"-"` 2644 // NullFields is a list of field names (e.g. "Permissions") to include in API 2645 // requests with the JSON null value. By default, fields with empty values are 2646 // omitted from API requests. See 2647 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2648 NullFields []string `json:"-"` 2649 } 2650 2651 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 2652 type NoMethod TestIamPermissionsResponse 2653 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2654 } 2655 2656 // Trace: Trace represents one simulated packet forwarding path. * Each trace 2657 // contains multiple ordered steps. * Each step is in a particular state with 2658 // associated configuration. * State is categorized as final or non-final 2659 // states. * Each final state has a reason associated. * Each trace must end 2660 // with a final state (the last step). ``` 2661 // |---------------------Trace----------------------| Step1(State) Step2(State) 2662 // --- StepN(State(final)) ``` 2663 type Trace struct { 2664 // EndpointInfo: Derived from the source and destination endpoints definition 2665 // specified by user request, and validated by the data plane model. If there 2666 // are multiple traces starting from different source locations, then the 2667 // endpoint_info may be different between traces. 2668 EndpointInfo *EndpointInfo `json:"endpointInfo,omitempty"` 2669 // ForwardTraceId: ID of trace. For forward traces, this ID is unique for each 2670 // trace. For return traces, it matches ID of associated forward trace. A 2671 // single forward trace can be associated with none, one or more than one 2672 // return trace. 2673 ForwardTraceId int64 `json:"forwardTraceId,omitempty"` 2674 // Steps: A trace of a test contains multiple steps from the initial state to 2675 // the final state (delivered, dropped, forwarded, or aborted). The steps are 2676 // ordered by the processing sequence within the simulated network state 2677 // machine. It is critical to preserve the order of the steps and avoid 2678 // reordering or sorting them. 2679 Steps []*Step `json:"steps,omitempty"` 2680 // ForceSendFields is a list of field names (e.g. "EndpointInfo") to 2681 // unconditionally include in API requests. By default, fields with empty or 2682 // default values are omitted from API requests. See 2683 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2684 // details. 2685 ForceSendFields []string `json:"-"` 2686 // NullFields is a list of field names (e.g. "EndpointInfo") to include in API 2687 // requests with the JSON null value. By default, fields with empty values are 2688 // omitted from API requests. See 2689 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2690 NullFields []string `json:"-"` 2691 } 2692 2693 func (s *Trace) MarshalJSON() ([]byte, error) { 2694 type NoMethod Trace 2695 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2696 } 2697 2698 // VpcConnectorInfo: For display only. Metadata associated with a VPC 2699 // connector. 2700 type VpcConnectorInfo struct { 2701 // DisplayName: Name of a VPC connector. 2702 DisplayName string `json:"displayName,omitempty"` 2703 // Location: Location in which the VPC connector is deployed. 2704 Location string `json:"location,omitempty"` 2705 // Uri: URI of a VPC connector. 2706 Uri string `json:"uri,omitempty"` 2707 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2708 // unconditionally include in API requests. By default, fields with empty or 2709 // default values are omitted from API requests. See 2710 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2711 // details. 2712 ForceSendFields []string `json:"-"` 2713 // NullFields is a list of field names (e.g. "DisplayName") to include in API 2714 // requests with the JSON null value. By default, fields with empty values are 2715 // omitted from API requests. See 2716 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2717 NullFields []string `json:"-"` 2718 } 2719 2720 func (s *VpcConnectorInfo) MarshalJSON() ([]byte, error) { 2721 type NoMethod VpcConnectorInfo 2722 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2723 } 2724 2725 // VpnGatewayInfo: For display only. Metadata associated with a Compute Engine 2726 // VPN gateway. 2727 type VpnGatewayInfo struct { 2728 // DisplayName: Name of a VPN gateway. 2729 DisplayName string `json:"displayName,omitempty"` 2730 // IpAddress: IP address of the VPN gateway. 2731 IpAddress string `json:"ipAddress,omitempty"` 2732 // NetworkUri: URI of a Compute Engine network where the VPN gateway is 2733 // configured. 2734 NetworkUri string `json:"networkUri,omitempty"` 2735 // Region: Name of a Google Cloud region where this VPN gateway is configured. 2736 Region string `json:"region,omitempty"` 2737 // Uri: URI of a VPN gateway. 2738 Uri string `json:"uri,omitempty"` 2739 // VpnTunnelUri: A VPN tunnel that is associated with this VPN gateway. There 2740 // may be multiple VPN tunnels configured on a VPN gateway, and only the one 2741 // relevant to the test is displayed. 2742 VpnTunnelUri string `json:"vpnTunnelUri,omitempty"` 2743 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2744 // unconditionally include in API requests. By default, fields with empty or 2745 // default values are omitted from API requests. See 2746 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2747 // details. 2748 ForceSendFields []string `json:"-"` 2749 // NullFields is a list of field names (e.g. "DisplayName") to include in API 2750 // requests with the JSON null value. By default, fields with empty values are 2751 // omitted from API requests. See 2752 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2753 NullFields []string `json:"-"` 2754 } 2755 2756 func (s *VpnGatewayInfo) MarshalJSON() ([]byte, error) { 2757 type NoMethod VpnGatewayInfo 2758 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2759 } 2760 2761 // VpnTunnelInfo: For display only. Metadata associated with a Compute Engine 2762 // VPN tunnel. 2763 type VpnTunnelInfo struct { 2764 // DisplayName: Name of a VPN tunnel. 2765 DisplayName string `json:"displayName,omitempty"` 2766 // NetworkUri: URI of a Compute Engine network where the VPN tunnel is 2767 // configured. 2768 NetworkUri string `json:"networkUri,omitempty"` 2769 // Region: Name of a Google Cloud region where this VPN tunnel is configured. 2770 Region string `json:"region,omitempty"` 2771 // RemoteGateway: URI of a VPN gateway at remote end of the tunnel. 2772 RemoteGateway string `json:"remoteGateway,omitempty"` 2773 // RemoteGatewayIp: Remote VPN gateway's IP address. 2774 RemoteGatewayIp string `json:"remoteGatewayIp,omitempty"` 2775 // RoutingType: Type of the routing policy. 2776 // 2777 // Possible values: 2778 // "ROUTING_TYPE_UNSPECIFIED" - Unspecified type. Default value. 2779 // "ROUTE_BASED" - Route based VPN. 2780 // "POLICY_BASED" - Policy based routing. 2781 // "DYNAMIC" - Dynamic (BGP) routing. 2782 RoutingType string `json:"routingType,omitempty"` 2783 // SourceGateway: URI of the VPN gateway at local end of the tunnel. 2784 SourceGateway string `json:"sourceGateway,omitempty"` 2785 // SourceGatewayIp: Local VPN gateway's IP address. 2786 SourceGatewayIp string `json:"sourceGatewayIp,omitempty"` 2787 // Uri: URI of a VPN tunnel. 2788 Uri string `json:"uri,omitempty"` 2789 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2790 // unconditionally include in API requests. By default, fields with empty or 2791 // default values are omitted from API requests. See 2792 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2793 // details. 2794 ForceSendFields []string `json:"-"` 2795 // NullFields is a list of field names (e.g. "DisplayName") to include in API 2796 // requests with the JSON null value. By default, fields with empty values are 2797 // omitted from API requests. See 2798 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2799 NullFields []string `json:"-"` 2800 } 2801 2802 func (s *VpnTunnelInfo) MarshalJSON() ([]byte, error) { 2803 type NoMethod VpnTunnelInfo 2804 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2805 } 2806 2807 type ProjectsLocationsGetCall struct { 2808 s *Service 2809 name string 2810 urlParams_ gensupport.URLParams 2811 ifNoneMatch_ string 2812 ctx_ context.Context 2813 header_ http.Header 2814 } 2815 2816 // Get: Gets information about a location. 2817 // 2818 // - name: Resource name for the location. 2819 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 2820 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2821 c.name = name 2822 return c 2823 } 2824 2825 // Fields allows partial responses to be retrieved. See 2826 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2827 // details. 2828 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 2829 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2830 return c 2831 } 2832 2833 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2834 // object's ETag matches the given value. This is useful for getting updates 2835 // only after the object has changed since the last request. 2836 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 2837 c.ifNoneMatch_ = entityTag 2838 return c 2839 } 2840 2841 // Context sets the context to be used in this call's Do method. 2842 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 2843 c.ctx_ = ctx 2844 return c 2845 } 2846 2847 // Header returns a http.Header that can be modified by the caller to add 2848 // headers to the request. 2849 func (c *ProjectsLocationsGetCall) Header() http.Header { 2850 if c.header_ == nil { 2851 c.header_ = make(http.Header) 2852 } 2853 return c.header_ 2854 } 2855 2856 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 2857 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2858 if c.ifNoneMatch_ != "" { 2859 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2860 } 2861 var body io.Reader = nil 2862 c.urlParams_.Set("alt", alt) 2863 c.urlParams_.Set("prettyPrint", "false") 2864 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 2865 urls += "?" + c.urlParams_.Encode() 2866 req, err := http.NewRequest("GET", urls, body) 2867 if err != nil { 2868 return nil, err 2869 } 2870 req.Header = reqHeaders 2871 googleapi.Expand(req.URL, map[string]string{ 2872 "name": c.name, 2873 }) 2874 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2875 } 2876 2877 // Do executes the "networkmanagement.projects.locations.get" call. 2878 // Any non-2xx status code is an error. Response headers are in either 2879 // *Location.ServerResponse.Header or (if a response was returned at all) in 2880 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2881 // whether the returned error was because http.StatusNotModified was returned. 2882 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 2883 gensupport.SetOptions(c.urlParams_, opts...) 2884 res, err := c.doRequest("json") 2885 if res != nil && res.StatusCode == http.StatusNotModified { 2886 if res.Body != nil { 2887 res.Body.Close() 2888 } 2889 return nil, gensupport.WrapError(&googleapi.Error{ 2890 Code: res.StatusCode, 2891 Header: res.Header, 2892 }) 2893 } 2894 if err != nil { 2895 return nil, err 2896 } 2897 defer googleapi.CloseBody(res) 2898 if err := googleapi.CheckResponse(res); err != nil { 2899 return nil, gensupport.WrapError(err) 2900 } 2901 ret := &Location{ 2902 ServerResponse: googleapi.ServerResponse{ 2903 Header: res.Header, 2904 HTTPStatusCode: res.StatusCode, 2905 }, 2906 } 2907 target := &ret 2908 if err := gensupport.DecodeResponse(target, res); err != nil { 2909 return nil, err 2910 } 2911 return ret, nil 2912 } 2913 2914 type ProjectsLocationsListCall struct { 2915 s *Service 2916 name string 2917 urlParams_ gensupport.URLParams 2918 ifNoneMatch_ string 2919 ctx_ context.Context 2920 header_ http.Header 2921 } 2922 2923 // List: Lists information about the supported locations for this service. 2924 // 2925 // - name: The resource that owns the locations collection, if applicable. 2926 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 2927 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2928 c.name = name 2929 return c 2930 } 2931 2932 // Filter sets the optional parameter "filter": A filter to narrow down results 2933 // to a preferred subset. The filtering language accepts strings like 2934 // "displayName=tokyo", and is documented in more detail in AIP-160 2935 // (https://google.aip.dev/160). 2936 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 2937 c.urlParams_.Set("filter", filter) 2938 return c 2939 } 2940 2941 // PageSize sets the optional parameter "pageSize": The maximum number of 2942 // results to return. If not set, the service selects a default. 2943 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 2944 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 2945 return c 2946 } 2947 2948 // PageToken sets the optional parameter "pageToken": A page token received 2949 // from the `next_page_token` field in the response. Send that page token to 2950 // receive the subsequent page. 2951 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 2952 c.urlParams_.Set("pageToken", pageToken) 2953 return c 2954 } 2955 2956 // Fields allows partial responses to be retrieved. See 2957 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2958 // details. 2959 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 2960 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2961 return c 2962 } 2963 2964 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2965 // object's ETag matches the given value. This is useful for getting updates 2966 // only after the object has changed since the last request. 2967 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 2968 c.ifNoneMatch_ = entityTag 2969 return c 2970 } 2971 2972 // Context sets the context to be used in this call's Do method. 2973 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 2974 c.ctx_ = ctx 2975 return c 2976 } 2977 2978 // Header returns a http.Header that can be modified by the caller to add 2979 // headers to the request. 2980 func (c *ProjectsLocationsListCall) Header() http.Header { 2981 if c.header_ == nil { 2982 c.header_ = make(http.Header) 2983 } 2984 return c.header_ 2985 } 2986 2987 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 2988 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2989 if c.ifNoneMatch_ != "" { 2990 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2991 } 2992 var body io.Reader = nil 2993 c.urlParams_.Set("alt", alt) 2994 c.urlParams_.Set("prettyPrint", "false") 2995 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations") 2996 urls += "?" + c.urlParams_.Encode() 2997 req, err := http.NewRequest("GET", urls, body) 2998 if err != nil { 2999 return nil, err 3000 } 3001 req.Header = reqHeaders 3002 googleapi.Expand(req.URL, map[string]string{ 3003 "name": c.name, 3004 }) 3005 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3006 } 3007 3008 // Do executes the "networkmanagement.projects.locations.list" call. 3009 // Any non-2xx status code is an error. Response headers are in either 3010 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned 3011 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3012 // check whether the returned error was because http.StatusNotModified was 3013 // returned. 3014 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 3015 gensupport.SetOptions(c.urlParams_, opts...) 3016 res, err := c.doRequest("json") 3017 if res != nil && res.StatusCode == http.StatusNotModified { 3018 if res.Body != nil { 3019 res.Body.Close() 3020 } 3021 return nil, gensupport.WrapError(&googleapi.Error{ 3022 Code: res.StatusCode, 3023 Header: res.Header, 3024 }) 3025 } 3026 if err != nil { 3027 return nil, err 3028 } 3029 defer googleapi.CloseBody(res) 3030 if err := googleapi.CheckResponse(res); err != nil { 3031 return nil, gensupport.WrapError(err) 3032 } 3033 ret := &ListLocationsResponse{ 3034 ServerResponse: googleapi.ServerResponse{ 3035 Header: res.Header, 3036 HTTPStatusCode: res.StatusCode, 3037 }, 3038 } 3039 target := &ret 3040 if err := gensupport.DecodeResponse(target, res); err != nil { 3041 return nil, err 3042 } 3043 return ret, nil 3044 } 3045 3046 // Pages invokes f for each page of results. 3047 // A non-nil error returned from f will halt the iteration. 3048 // The provided context supersedes any context provided to the Context method. 3049 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 3050 c.ctx_ = ctx 3051 defer c.PageToken(c.urlParams_.Get("pageToken")) 3052 for { 3053 x, err := c.Do() 3054 if err != nil { 3055 return err 3056 } 3057 if err := f(x); err != nil { 3058 return err 3059 } 3060 if x.NextPageToken == "" { 3061 return nil 3062 } 3063 c.PageToken(x.NextPageToken) 3064 } 3065 } 3066 3067 type ProjectsLocationsGlobalConnectivityTestsCreateCall struct { 3068 s *Service 3069 parent string 3070 connectivitytest *ConnectivityTest 3071 urlParams_ gensupport.URLParams 3072 ctx_ context.Context 3073 header_ http.Header 3074 } 3075 3076 // Create: Creates a new Connectivity Test. After you create a test, the 3077 // reachability analysis is performed as part of the long running operation, 3078 // which completes when the analysis completes. If the endpoint specifications 3079 // in `ConnectivityTest` are invalid (for example, containing non-existent 3080 // resources in the network, or you don't have read permissions to the network 3081 // configurations of listed projects), then the reachability result returns a 3082 // value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are 3083 // incomplete, the reachability result returns a value of AMBIGUOUS. For more 3084 // information, see the Connectivity Test documentation. 3085 // 3086 // - parent: The parent resource of the Connectivity Test to create: 3087 // `projects/{project_id}/locations/global`. 3088 func (r *ProjectsLocationsGlobalConnectivityTestsService) Create(parent string, connectivitytest *ConnectivityTest) *ProjectsLocationsGlobalConnectivityTestsCreateCall { 3089 c := &ProjectsLocationsGlobalConnectivityTestsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3090 c.parent = parent 3091 c.connectivitytest = connectivitytest 3092 return c 3093 } 3094 3095 // TestId sets the optional parameter "testId": Required. The logical name of 3096 // the Connectivity Test in your project with the following restrictions: * 3097 // Must contain only lowercase letters, numbers, and hyphens. * Must start with 3098 // a letter. * Must be between 1-40 characters. * Must end with a number or a 3099 // letter. * Must be unique within the customer project 3100 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) TestId(testId string) *ProjectsLocationsGlobalConnectivityTestsCreateCall { 3101 c.urlParams_.Set("testId", testId) 3102 return c 3103 } 3104 3105 // Fields allows partial responses to be retrieved. See 3106 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3107 // details. 3108 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsCreateCall { 3109 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3110 return c 3111 } 3112 3113 // Context sets the context to be used in this call's Do method. 3114 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsCreateCall { 3115 c.ctx_ = ctx 3116 return c 3117 } 3118 3119 // Header returns a http.Header that can be modified by the caller to add 3120 // headers to the request. 3121 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) Header() http.Header { 3122 if c.header_ == nil { 3123 c.header_ = make(http.Header) 3124 } 3125 return c.header_ 3126 } 3127 3128 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) doRequest(alt string) (*http.Response, error) { 3129 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3130 var body io.Reader = nil 3131 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectivitytest) 3132 if err != nil { 3133 return nil, err 3134 } 3135 c.urlParams_.Set("alt", alt) 3136 c.urlParams_.Set("prettyPrint", "false") 3137 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/connectivityTests") 3138 urls += "?" + c.urlParams_.Encode() 3139 req, err := http.NewRequest("POST", urls, body) 3140 if err != nil { 3141 return nil, err 3142 } 3143 req.Header = reqHeaders 3144 googleapi.Expand(req.URL, map[string]string{ 3145 "parent": c.parent, 3146 }) 3147 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3148 } 3149 3150 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.create" call. 3151 // Any non-2xx status code is an error. Response headers are in either 3152 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3153 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3154 // whether the returned error was because http.StatusNotModified was returned. 3155 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3156 gensupport.SetOptions(c.urlParams_, opts...) 3157 res, err := c.doRequest("json") 3158 if res != nil && res.StatusCode == http.StatusNotModified { 3159 if res.Body != nil { 3160 res.Body.Close() 3161 } 3162 return nil, gensupport.WrapError(&googleapi.Error{ 3163 Code: res.StatusCode, 3164 Header: res.Header, 3165 }) 3166 } 3167 if err != nil { 3168 return nil, err 3169 } 3170 defer googleapi.CloseBody(res) 3171 if err := googleapi.CheckResponse(res); err != nil { 3172 return nil, gensupport.WrapError(err) 3173 } 3174 ret := &Operation{ 3175 ServerResponse: googleapi.ServerResponse{ 3176 Header: res.Header, 3177 HTTPStatusCode: res.StatusCode, 3178 }, 3179 } 3180 target := &ret 3181 if err := gensupport.DecodeResponse(target, res); err != nil { 3182 return nil, err 3183 } 3184 return ret, nil 3185 } 3186 3187 type ProjectsLocationsGlobalConnectivityTestsDeleteCall struct { 3188 s *Service 3189 name string 3190 urlParams_ gensupport.URLParams 3191 ctx_ context.Context 3192 header_ http.Header 3193 } 3194 3195 // Delete: Deletes a specific `ConnectivityTest`. 3196 // 3197 // - name: Connectivity Test resource name using the form: 3198 // `projects/{project_id}/locations/global/connectivityTests/{test_id}`. 3199 func (r *ProjectsLocationsGlobalConnectivityTestsService) Delete(name string) *ProjectsLocationsGlobalConnectivityTestsDeleteCall { 3200 c := &ProjectsLocationsGlobalConnectivityTestsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3201 c.name = name 3202 return c 3203 } 3204 3205 // Fields allows partial responses to be retrieved. See 3206 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3207 // details. 3208 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsDeleteCall { 3209 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3210 return c 3211 } 3212 3213 // Context sets the context to be used in this call's Do method. 3214 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsDeleteCall { 3215 c.ctx_ = ctx 3216 return c 3217 } 3218 3219 // Header returns a http.Header that can be modified by the caller to add 3220 // headers to the request. 3221 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) Header() http.Header { 3222 if c.header_ == nil { 3223 c.header_ = make(http.Header) 3224 } 3225 return c.header_ 3226 } 3227 3228 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) doRequest(alt string) (*http.Response, error) { 3229 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3230 var body io.Reader = nil 3231 c.urlParams_.Set("alt", alt) 3232 c.urlParams_.Set("prettyPrint", "false") 3233 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 3234 urls += "?" + c.urlParams_.Encode() 3235 req, err := http.NewRequest("DELETE", urls, body) 3236 if err != nil { 3237 return nil, err 3238 } 3239 req.Header = reqHeaders 3240 googleapi.Expand(req.URL, map[string]string{ 3241 "name": c.name, 3242 }) 3243 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3244 } 3245 3246 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.delete" call. 3247 // Any non-2xx status code is an error. Response headers are in either 3248 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3249 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3250 // whether the returned error was because http.StatusNotModified was returned. 3251 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3252 gensupport.SetOptions(c.urlParams_, opts...) 3253 res, err := c.doRequest("json") 3254 if res != nil && res.StatusCode == http.StatusNotModified { 3255 if res.Body != nil { 3256 res.Body.Close() 3257 } 3258 return nil, gensupport.WrapError(&googleapi.Error{ 3259 Code: res.StatusCode, 3260 Header: res.Header, 3261 }) 3262 } 3263 if err != nil { 3264 return nil, err 3265 } 3266 defer googleapi.CloseBody(res) 3267 if err := googleapi.CheckResponse(res); err != nil { 3268 return nil, gensupport.WrapError(err) 3269 } 3270 ret := &Operation{ 3271 ServerResponse: googleapi.ServerResponse{ 3272 Header: res.Header, 3273 HTTPStatusCode: res.StatusCode, 3274 }, 3275 } 3276 target := &ret 3277 if err := gensupport.DecodeResponse(target, res); err != nil { 3278 return nil, err 3279 } 3280 return ret, nil 3281 } 3282 3283 type ProjectsLocationsGlobalConnectivityTestsGetCall struct { 3284 s *Service 3285 name string 3286 urlParams_ gensupport.URLParams 3287 ifNoneMatch_ string 3288 ctx_ context.Context 3289 header_ http.Header 3290 } 3291 3292 // Get: Gets the details of a specific Connectivity Test. 3293 // 3294 // - name: `ConnectivityTest` resource name using the form: 3295 // `projects/{project_id}/locations/global/connectivityTests/{test_id}`. 3296 func (r *ProjectsLocationsGlobalConnectivityTestsService) Get(name string) *ProjectsLocationsGlobalConnectivityTestsGetCall { 3297 c := &ProjectsLocationsGlobalConnectivityTestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3298 c.name = name 3299 return c 3300 } 3301 3302 // Fields allows partial responses to be retrieved. See 3303 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3304 // details. 3305 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsGetCall { 3306 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3307 return c 3308 } 3309 3310 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3311 // object's ETag matches the given value. This is useful for getting updates 3312 // only after the object has changed since the last request. 3313 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalConnectivityTestsGetCall { 3314 c.ifNoneMatch_ = entityTag 3315 return c 3316 } 3317 3318 // Context sets the context to be used in this call's Do method. 3319 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsGetCall { 3320 c.ctx_ = ctx 3321 return c 3322 } 3323 3324 // Header returns a http.Header that can be modified by the caller to add 3325 // headers to the request. 3326 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) Header() http.Header { 3327 if c.header_ == nil { 3328 c.header_ = make(http.Header) 3329 } 3330 return c.header_ 3331 } 3332 3333 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) doRequest(alt string) (*http.Response, error) { 3334 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3335 if c.ifNoneMatch_ != "" { 3336 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3337 } 3338 var body io.Reader = nil 3339 c.urlParams_.Set("alt", alt) 3340 c.urlParams_.Set("prettyPrint", "false") 3341 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 3342 urls += "?" + c.urlParams_.Encode() 3343 req, err := http.NewRequest("GET", urls, body) 3344 if err != nil { 3345 return nil, err 3346 } 3347 req.Header = reqHeaders 3348 googleapi.Expand(req.URL, map[string]string{ 3349 "name": c.name, 3350 }) 3351 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3352 } 3353 3354 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.get" call. 3355 // Any non-2xx status code is an error. Response headers are in either 3356 // *ConnectivityTest.ServerResponse.Header or (if a response was returned at 3357 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3358 // check whether the returned error was because http.StatusNotModified was 3359 // returned. 3360 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) Do(opts ...googleapi.CallOption) (*ConnectivityTest, error) { 3361 gensupport.SetOptions(c.urlParams_, opts...) 3362 res, err := c.doRequest("json") 3363 if res != nil && res.StatusCode == http.StatusNotModified { 3364 if res.Body != nil { 3365 res.Body.Close() 3366 } 3367 return nil, gensupport.WrapError(&googleapi.Error{ 3368 Code: res.StatusCode, 3369 Header: res.Header, 3370 }) 3371 } 3372 if err != nil { 3373 return nil, err 3374 } 3375 defer googleapi.CloseBody(res) 3376 if err := googleapi.CheckResponse(res); err != nil { 3377 return nil, gensupport.WrapError(err) 3378 } 3379 ret := &ConnectivityTest{ 3380 ServerResponse: googleapi.ServerResponse{ 3381 Header: res.Header, 3382 HTTPStatusCode: res.StatusCode, 3383 }, 3384 } 3385 target := &ret 3386 if err := gensupport.DecodeResponse(target, res); err != nil { 3387 return nil, err 3388 } 3389 return ret, nil 3390 } 3391 3392 type ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall struct { 3393 s *Service 3394 resource string 3395 urlParams_ gensupport.URLParams 3396 ifNoneMatch_ string 3397 ctx_ context.Context 3398 header_ http.Header 3399 } 3400 3401 // GetIamPolicy: Gets the access control policy for a resource. Returns an 3402 // empty policy if the resource exists and does not have a policy set. 3403 // 3404 // - resource: REQUIRED: The resource for which the policy is being requested. 3405 // See Resource names (https://cloud.google.com/apis/design/resource_names) 3406 // for the appropriate value for this field. 3407 func (r *ProjectsLocationsGlobalConnectivityTestsService) GetIamPolicy(resource string) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3408 c := &ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3409 c.resource = resource 3410 return c 3411 } 3412 3413 // OptionsRequestedPolicyVersion sets the optional parameter 3414 // "options.requestedPolicyVersion": The maximum policy version that will be 3415 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying 3416 // an invalid value will be rejected. Requests for policies with any 3417 // conditional role bindings must specify version 3. Policies with no 3418 // conditional role bindings may specify any valid value or leave the field 3419 // unset. The policy in the response might use the policy version that you 3420 // specified, or it might use a lower policy version. For example, if you 3421 // specify version 3, but the policy has no conditional role bindings, the 3422 // response uses version 1. To learn which resources support conditions in 3423 // their IAM policies, see the IAM documentation 3424 // (https://cloud.google.com/iam/help/conditions/resource-policies). 3425 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3426 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 3427 return c 3428 } 3429 3430 // Fields allows partial responses to be retrieved. See 3431 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3432 // details. 3433 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3434 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3435 return c 3436 } 3437 3438 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3439 // object's ETag matches the given value. This is useful for getting updates 3440 // only after the object has changed since the last request. 3441 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3442 c.ifNoneMatch_ = entityTag 3443 return c 3444 } 3445 3446 // Context sets the context to be used in this call's Do method. 3447 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3448 c.ctx_ = ctx 3449 return c 3450 } 3451 3452 // Header returns a http.Header that can be modified by the caller to add 3453 // headers to the request. 3454 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) Header() http.Header { 3455 if c.header_ == nil { 3456 c.header_ = make(http.Header) 3457 } 3458 return c.header_ 3459 } 3460 3461 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3462 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3463 if c.ifNoneMatch_ != "" { 3464 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3465 } 3466 var body io.Reader = nil 3467 c.urlParams_.Set("alt", alt) 3468 c.urlParams_.Set("prettyPrint", "false") 3469 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 3470 urls += "?" + c.urlParams_.Encode() 3471 req, err := http.NewRequest("GET", urls, body) 3472 if err != nil { 3473 return nil, err 3474 } 3475 req.Header = reqHeaders 3476 googleapi.Expand(req.URL, map[string]string{ 3477 "resource": c.resource, 3478 }) 3479 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3480 } 3481 3482 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.getIamPolicy" call. 3483 // Any non-2xx status code is an error. Response headers are in either 3484 // *Policy.ServerResponse.Header or (if a response was returned at all) in 3485 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3486 // whether the returned error was because http.StatusNotModified was returned. 3487 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3488 gensupport.SetOptions(c.urlParams_, opts...) 3489 res, err := c.doRequest("json") 3490 if res != nil && res.StatusCode == http.StatusNotModified { 3491 if res.Body != nil { 3492 res.Body.Close() 3493 } 3494 return nil, gensupport.WrapError(&googleapi.Error{ 3495 Code: res.StatusCode, 3496 Header: res.Header, 3497 }) 3498 } 3499 if err != nil { 3500 return nil, err 3501 } 3502 defer googleapi.CloseBody(res) 3503 if err := googleapi.CheckResponse(res); err != nil { 3504 return nil, gensupport.WrapError(err) 3505 } 3506 ret := &Policy{ 3507 ServerResponse: googleapi.ServerResponse{ 3508 Header: res.Header, 3509 HTTPStatusCode: res.StatusCode, 3510 }, 3511 } 3512 target := &ret 3513 if err := gensupport.DecodeResponse(target, res); err != nil { 3514 return nil, err 3515 } 3516 return ret, nil 3517 } 3518 3519 type ProjectsLocationsGlobalConnectivityTestsListCall struct { 3520 s *Service 3521 parent string 3522 urlParams_ gensupport.URLParams 3523 ifNoneMatch_ string 3524 ctx_ context.Context 3525 header_ http.Header 3526 } 3527 3528 // List: Lists all Connectivity Tests owned by a project. 3529 // 3530 // - parent: The parent resource of the Connectivity Tests: 3531 // `projects/{project_id}/locations/global`. 3532 func (r *ProjectsLocationsGlobalConnectivityTestsService) List(parent string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3533 c := &ProjectsLocationsGlobalConnectivityTestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3534 c.parent = parent 3535 return c 3536 } 3537 3538 // Filter sets the optional parameter "filter": Lists the `ConnectivityTests` 3539 // that match the filter expression. A filter expression filters the resources 3540 // listed in the response. The expression must be of the form ` ` where 3541 // operators: `<`, `>`, `<=`, `>=`, `!=`, `=`, `:` are supported (colon `:` 3542 // represents a HAS operator which is roughly synonymous with equality). can 3543 // refer to a proto or JSON field, or a synthetic field. Field names can be 3544 // camelCase or snake_case. Examples: - Filter by name: name = 3545 // "projects/proj-1/locations/global/connectivityTests/test-1 - Filter by 3546 // labels: - Resources that have a key called `foo` labels.foo:* - Resources 3547 // that have a key called `foo` whose value is `bar` labels.foo = bar 3548 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Filter(filter string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3549 c.urlParams_.Set("filter", filter) 3550 return c 3551 } 3552 3553 // OrderBy sets the optional parameter "orderBy": Field to use to sort the 3554 // list. 3555 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3556 c.urlParams_.Set("orderBy", orderBy) 3557 return c 3558 } 3559 3560 // PageSize sets the optional parameter "pageSize": Number of 3561 // `ConnectivityTests` to return. 3562 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalConnectivityTestsListCall { 3563 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3564 return c 3565 } 3566 3567 // PageToken sets the optional parameter "pageToken": Page token from an 3568 // earlier query, as returned in `next_page_token`. 3569 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3570 c.urlParams_.Set("pageToken", pageToken) 3571 return c 3572 } 3573 3574 // Fields allows partial responses to be retrieved. See 3575 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3576 // details. 3577 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsListCall { 3578 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3579 return c 3580 } 3581 3582 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3583 // object's ETag matches the given value. This is useful for getting updates 3584 // only after the object has changed since the last request. 3585 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3586 c.ifNoneMatch_ = entityTag 3587 return c 3588 } 3589 3590 // Context sets the context to be used in this call's Do method. 3591 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsListCall { 3592 c.ctx_ = ctx 3593 return c 3594 } 3595 3596 // Header returns a http.Header that can be modified by the caller to add 3597 // headers to the request. 3598 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Header() http.Header { 3599 if c.header_ == nil { 3600 c.header_ = make(http.Header) 3601 } 3602 return c.header_ 3603 } 3604 3605 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) doRequest(alt string) (*http.Response, error) { 3606 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3607 if c.ifNoneMatch_ != "" { 3608 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3609 } 3610 var body io.Reader = nil 3611 c.urlParams_.Set("alt", alt) 3612 c.urlParams_.Set("prettyPrint", "false") 3613 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/connectivityTests") 3614 urls += "?" + c.urlParams_.Encode() 3615 req, err := http.NewRequest("GET", urls, body) 3616 if err != nil { 3617 return nil, err 3618 } 3619 req.Header = reqHeaders 3620 googleapi.Expand(req.URL, map[string]string{ 3621 "parent": c.parent, 3622 }) 3623 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3624 } 3625 3626 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.list" call. 3627 // Any non-2xx status code is an error. Response headers are in either 3628 // *ListConnectivityTestsResponse.ServerResponse.Header or (if a response was 3629 // returned at all) in error.(*googleapi.Error).Header. Use 3630 // googleapi.IsNotModified to check whether the returned error was because 3631 // http.StatusNotModified was returned. 3632 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Do(opts ...googleapi.CallOption) (*ListConnectivityTestsResponse, error) { 3633 gensupport.SetOptions(c.urlParams_, opts...) 3634 res, err := c.doRequest("json") 3635 if res != nil && res.StatusCode == http.StatusNotModified { 3636 if res.Body != nil { 3637 res.Body.Close() 3638 } 3639 return nil, gensupport.WrapError(&googleapi.Error{ 3640 Code: res.StatusCode, 3641 Header: res.Header, 3642 }) 3643 } 3644 if err != nil { 3645 return nil, err 3646 } 3647 defer googleapi.CloseBody(res) 3648 if err := googleapi.CheckResponse(res); err != nil { 3649 return nil, gensupport.WrapError(err) 3650 } 3651 ret := &ListConnectivityTestsResponse{ 3652 ServerResponse: googleapi.ServerResponse{ 3653 Header: res.Header, 3654 HTTPStatusCode: res.StatusCode, 3655 }, 3656 } 3657 target := &ret 3658 if err := gensupport.DecodeResponse(target, res); err != nil { 3659 return nil, err 3660 } 3661 return ret, nil 3662 } 3663 3664 // Pages invokes f for each page of results. 3665 // A non-nil error returned from f will halt the iteration. 3666 // The provided context supersedes any context provided to the Context method. 3667 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Pages(ctx context.Context, f func(*ListConnectivityTestsResponse) error) error { 3668 c.ctx_ = ctx 3669 defer c.PageToken(c.urlParams_.Get("pageToken")) 3670 for { 3671 x, err := c.Do() 3672 if err != nil { 3673 return err 3674 } 3675 if err := f(x); err != nil { 3676 return err 3677 } 3678 if x.NextPageToken == "" { 3679 return nil 3680 } 3681 c.PageToken(x.NextPageToken) 3682 } 3683 } 3684 3685 type ProjectsLocationsGlobalConnectivityTestsPatchCall struct { 3686 s *Service 3687 name string 3688 connectivitytest *ConnectivityTest 3689 urlParams_ gensupport.URLParams 3690 ctx_ context.Context 3691 header_ http.Header 3692 } 3693 3694 // Patch: Updates the configuration of an existing `ConnectivityTest`. After 3695 // you update a test, the reachability analysis is performed as part of the 3696 // long running operation, which completes when the analysis completes. The 3697 // Reachability state in the test resource is updated with the new result. If 3698 // the endpoint specifications in `ConnectivityTest` are invalid (for example, 3699 // they contain non-existent resources in the network, or the user does not 3700 // have read permissions to the network configurations of listed projects), 3701 // then the reachability result returns a value of UNKNOWN. If the endpoint 3702 // specifications in `ConnectivityTest` are incomplete, the reachability result 3703 // returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` 3704 // for more details. 3705 // 3706 // - name: Identifier. Unique name of the resource using the form: 3707 // `projects/{project_id}/locations/global/connectivityTests/{test}`. 3708 func (r *ProjectsLocationsGlobalConnectivityTestsService) Patch(name string, connectivitytest *ConnectivityTest) *ProjectsLocationsGlobalConnectivityTestsPatchCall { 3709 c := &ProjectsLocationsGlobalConnectivityTestsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3710 c.name = name 3711 c.connectivitytest = connectivitytest 3712 return c 3713 } 3714 3715 // UpdateMask sets the optional parameter "updateMask": Required. Mask of 3716 // fields to update. At least one path must be supplied in this field. 3717 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalConnectivityTestsPatchCall { 3718 c.urlParams_.Set("updateMask", updateMask) 3719 return c 3720 } 3721 3722 // Fields allows partial responses to be retrieved. See 3723 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3724 // details. 3725 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsPatchCall { 3726 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3727 return c 3728 } 3729 3730 // Context sets the context to be used in this call's Do method. 3731 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsPatchCall { 3732 c.ctx_ = ctx 3733 return c 3734 } 3735 3736 // Header returns a http.Header that can be modified by the caller to add 3737 // headers to the request. 3738 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Header() http.Header { 3739 if c.header_ == nil { 3740 c.header_ = make(http.Header) 3741 } 3742 return c.header_ 3743 } 3744 3745 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) doRequest(alt string) (*http.Response, error) { 3746 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3747 var body io.Reader = nil 3748 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectivitytest) 3749 if err != nil { 3750 return nil, err 3751 } 3752 c.urlParams_.Set("alt", alt) 3753 c.urlParams_.Set("prettyPrint", "false") 3754 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 3755 urls += "?" + c.urlParams_.Encode() 3756 req, err := http.NewRequest("PATCH", urls, body) 3757 if err != nil { 3758 return nil, err 3759 } 3760 req.Header = reqHeaders 3761 googleapi.Expand(req.URL, map[string]string{ 3762 "name": c.name, 3763 }) 3764 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3765 } 3766 3767 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.patch" call. 3768 // Any non-2xx status code is an error. Response headers are in either 3769 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3770 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3771 // whether the returned error was because http.StatusNotModified was returned. 3772 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3773 gensupport.SetOptions(c.urlParams_, opts...) 3774 res, err := c.doRequest("json") 3775 if res != nil && res.StatusCode == http.StatusNotModified { 3776 if res.Body != nil { 3777 res.Body.Close() 3778 } 3779 return nil, gensupport.WrapError(&googleapi.Error{ 3780 Code: res.StatusCode, 3781 Header: res.Header, 3782 }) 3783 } 3784 if err != nil { 3785 return nil, err 3786 } 3787 defer googleapi.CloseBody(res) 3788 if err := googleapi.CheckResponse(res); err != nil { 3789 return nil, gensupport.WrapError(err) 3790 } 3791 ret := &Operation{ 3792 ServerResponse: googleapi.ServerResponse{ 3793 Header: res.Header, 3794 HTTPStatusCode: res.StatusCode, 3795 }, 3796 } 3797 target := &ret 3798 if err := gensupport.DecodeResponse(target, res); err != nil { 3799 return nil, err 3800 } 3801 return ret, nil 3802 } 3803 3804 type ProjectsLocationsGlobalConnectivityTestsRerunCall struct { 3805 s *Service 3806 name string 3807 rerunconnectivitytestrequest *RerunConnectivityTestRequest 3808 urlParams_ gensupport.URLParams 3809 ctx_ context.Context 3810 header_ http.Header 3811 } 3812 3813 // Rerun: Rerun an existing `ConnectivityTest`. After the user triggers the 3814 // rerun, the reachability analysis is performed as part of the long running 3815 // operation, which completes when the analysis completes. Even though the test 3816 // configuration remains the same, the reachability result may change due to 3817 // underlying network configuration changes. If the endpoint specifications in 3818 // `ConnectivityTest` become invalid (for example, specified resources are 3819 // deleted in the network, or you lost read permissions to the network 3820 // configurations of listed projects), then the reachability result returns a 3821 // value of `UNKNOWN`. 3822 // 3823 // - name: Connectivity Test resource name using the form: 3824 // `projects/{project_id}/locations/global/connectivityTests/{test_id}`. 3825 func (r *ProjectsLocationsGlobalConnectivityTestsService) Rerun(name string, rerunconnectivitytestrequest *RerunConnectivityTestRequest) *ProjectsLocationsGlobalConnectivityTestsRerunCall { 3826 c := &ProjectsLocationsGlobalConnectivityTestsRerunCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3827 c.name = name 3828 c.rerunconnectivitytestrequest = rerunconnectivitytestrequest 3829 return c 3830 } 3831 3832 // Fields allows partial responses to be retrieved. See 3833 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3834 // details. 3835 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsRerunCall { 3836 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3837 return c 3838 } 3839 3840 // Context sets the context to be used in this call's Do method. 3841 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsRerunCall { 3842 c.ctx_ = ctx 3843 return c 3844 } 3845 3846 // Header returns a http.Header that can be modified by the caller to add 3847 // headers to the request. 3848 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) Header() http.Header { 3849 if c.header_ == nil { 3850 c.header_ = make(http.Header) 3851 } 3852 return c.header_ 3853 } 3854 3855 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) doRequest(alt string) (*http.Response, error) { 3856 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3857 var body io.Reader = nil 3858 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rerunconnectivitytestrequest) 3859 if err != nil { 3860 return nil, err 3861 } 3862 c.urlParams_.Set("alt", alt) 3863 c.urlParams_.Set("prettyPrint", "false") 3864 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rerun") 3865 urls += "?" + c.urlParams_.Encode() 3866 req, err := http.NewRequest("POST", urls, body) 3867 if err != nil { 3868 return nil, err 3869 } 3870 req.Header = reqHeaders 3871 googleapi.Expand(req.URL, map[string]string{ 3872 "name": c.name, 3873 }) 3874 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3875 } 3876 3877 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.rerun" call. 3878 // Any non-2xx status code is an error. Response headers are in either 3879 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3880 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3881 // whether the returned error was because http.StatusNotModified was returned. 3882 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3883 gensupport.SetOptions(c.urlParams_, opts...) 3884 res, err := c.doRequest("json") 3885 if res != nil && res.StatusCode == http.StatusNotModified { 3886 if res.Body != nil { 3887 res.Body.Close() 3888 } 3889 return nil, gensupport.WrapError(&googleapi.Error{ 3890 Code: res.StatusCode, 3891 Header: res.Header, 3892 }) 3893 } 3894 if err != nil { 3895 return nil, err 3896 } 3897 defer googleapi.CloseBody(res) 3898 if err := googleapi.CheckResponse(res); err != nil { 3899 return nil, gensupport.WrapError(err) 3900 } 3901 ret := &Operation{ 3902 ServerResponse: googleapi.ServerResponse{ 3903 Header: res.Header, 3904 HTTPStatusCode: res.StatusCode, 3905 }, 3906 } 3907 target := &ret 3908 if err := gensupport.DecodeResponse(target, res); err != nil { 3909 return nil, err 3910 } 3911 return ret, nil 3912 } 3913 3914 type ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall struct { 3915 s *Service 3916 resource string 3917 setiampolicyrequest *SetIamPolicyRequest 3918 urlParams_ gensupport.URLParams 3919 ctx_ context.Context 3920 header_ http.Header 3921 } 3922 3923 // SetIamPolicy: Sets the access control policy on the specified resource. 3924 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, 3925 // and `PERMISSION_DENIED` errors. 3926 // 3927 // - resource: REQUIRED: The resource for which the policy is being specified. 3928 // See Resource names (https://cloud.google.com/apis/design/resource_names) 3929 // for the appropriate value for this field. 3930 func (r *ProjectsLocationsGlobalConnectivityTestsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall { 3931 c := &ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3932 c.resource = resource 3933 c.setiampolicyrequest = setiampolicyrequest 3934 return c 3935 } 3936 3937 // Fields allows partial responses to be retrieved. See 3938 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3939 // details. 3940 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall { 3941 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3942 return c 3943 } 3944 3945 // Context sets the context to be used in this call's Do method. 3946 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall { 3947 c.ctx_ = ctx 3948 return c 3949 } 3950 3951 // Header returns a http.Header that can be modified by the caller to add 3952 // headers to the request. 3953 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) Header() http.Header { 3954 if c.header_ == nil { 3955 c.header_ = make(http.Header) 3956 } 3957 return c.header_ 3958 } 3959 3960 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3961 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3962 var body io.Reader = nil 3963 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 3964 if err != nil { 3965 return nil, err 3966 } 3967 c.urlParams_.Set("alt", alt) 3968 c.urlParams_.Set("prettyPrint", "false") 3969 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 3970 urls += "?" + c.urlParams_.Encode() 3971 req, err := http.NewRequest("POST", urls, body) 3972 if err != nil { 3973 return nil, err 3974 } 3975 req.Header = reqHeaders 3976 googleapi.Expand(req.URL, map[string]string{ 3977 "resource": c.resource, 3978 }) 3979 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3980 } 3981 3982 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.setIamPolicy" call. 3983 // Any non-2xx status code is an error. Response headers are in either 3984 // *Policy.ServerResponse.Header or (if a response was returned at all) in 3985 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3986 // whether the returned error was because http.StatusNotModified was returned. 3987 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3988 gensupport.SetOptions(c.urlParams_, opts...) 3989 res, err := c.doRequest("json") 3990 if res != nil && res.StatusCode == http.StatusNotModified { 3991 if res.Body != nil { 3992 res.Body.Close() 3993 } 3994 return nil, gensupport.WrapError(&googleapi.Error{ 3995 Code: res.StatusCode, 3996 Header: res.Header, 3997 }) 3998 } 3999 if err != nil { 4000 return nil, err 4001 } 4002 defer googleapi.CloseBody(res) 4003 if err := googleapi.CheckResponse(res); err != nil { 4004 return nil, gensupport.WrapError(err) 4005 } 4006 ret := &Policy{ 4007 ServerResponse: googleapi.ServerResponse{ 4008 Header: res.Header, 4009 HTTPStatusCode: res.StatusCode, 4010 }, 4011 } 4012 target := &ret 4013 if err := gensupport.DecodeResponse(target, res); err != nil { 4014 return nil, err 4015 } 4016 return ret, nil 4017 } 4018 4019 type ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall struct { 4020 s *Service 4021 resource string 4022 testiampermissionsrequest *TestIamPermissionsRequest 4023 urlParams_ gensupport.URLParams 4024 ctx_ context.Context 4025 header_ http.Header 4026 } 4027 4028 // TestIamPermissions: Returns permissions that a caller has on the specified 4029 // resource. If the resource does not exist, this will return an empty set of 4030 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be 4031 // used for building permission-aware UIs and command-line tools, not for 4032 // authorization checking. This operation may "fail open" without warning. 4033 // 4034 // - resource: REQUIRED: The resource for which the policy detail is being 4035 // requested. See Resource names 4036 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 4037 // value for this field. 4038 func (r *ProjectsLocationsGlobalConnectivityTestsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall { 4039 c := &ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4040 c.resource = resource 4041 c.testiampermissionsrequest = testiampermissionsrequest 4042 return c 4043 } 4044 4045 // Fields allows partial responses to be retrieved. See 4046 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4047 // details. 4048 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall { 4049 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4050 return c 4051 } 4052 4053 // Context sets the context to be used in this call's Do method. 4054 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall { 4055 c.ctx_ = ctx 4056 return c 4057 } 4058 4059 // Header returns a http.Header that can be modified by the caller to add 4060 // headers to the request. 4061 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) Header() http.Header { 4062 if c.header_ == nil { 4063 c.header_ = make(http.Header) 4064 } 4065 return c.header_ 4066 } 4067 4068 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 4069 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4070 var body io.Reader = nil 4071 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 4072 if err != nil { 4073 return nil, err 4074 } 4075 c.urlParams_.Set("alt", alt) 4076 c.urlParams_.Set("prettyPrint", "false") 4077 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 4078 urls += "?" + c.urlParams_.Encode() 4079 req, err := http.NewRequest("POST", urls, body) 4080 if err != nil { 4081 return nil, err 4082 } 4083 req.Header = reqHeaders 4084 googleapi.Expand(req.URL, map[string]string{ 4085 "resource": c.resource, 4086 }) 4087 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4088 } 4089 4090 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.testIamPermissions" call. 4091 // Any non-2xx status code is an error. Response headers are in either 4092 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 4093 // returned at all) in error.(*googleapi.Error).Header. Use 4094 // googleapi.IsNotModified to check whether the returned error was because 4095 // http.StatusNotModified was returned. 4096 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 4097 gensupport.SetOptions(c.urlParams_, opts...) 4098 res, err := c.doRequest("json") 4099 if res != nil && res.StatusCode == http.StatusNotModified { 4100 if res.Body != nil { 4101 res.Body.Close() 4102 } 4103 return nil, gensupport.WrapError(&googleapi.Error{ 4104 Code: res.StatusCode, 4105 Header: res.Header, 4106 }) 4107 } 4108 if err != nil { 4109 return nil, err 4110 } 4111 defer googleapi.CloseBody(res) 4112 if err := googleapi.CheckResponse(res); err != nil { 4113 return nil, gensupport.WrapError(err) 4114 } 4115 ret := &TestIamPermissionsResponse{ 4116 ServerResponse: googleapi.ServerResponse{ 4117 Header: res.Header, 4118 HTTPStatusCode: res.StatusCode, 4119 }, 4120 } 4121 target := &ret 4122 if err := gensupport.DecodeResponse(target, res); err != nil { 4123 return nil, err 4124 } 4125 return ret, nil 4126 } 4127 4128 type ProjectsLocationsGlobalOperationsCancelCall struct { 4129 s *Service 4130 name string 4131 canceloperationrequest *CancelOperationRequest 4132 urlParams_ gensupport.URLParams 4133 ctx_ context.Context 4134 header_ http.Header 4135 } 4136 4137 // Cancel: Starts asynchronous cancellation on a long-running operation. The 4138 // server makes a best effort to cancel the operation, but success is not 4139 // guaranteed. If the server doesn't support this method, it returns 4140 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or 4141 // other methods to check whether the cancellation succeeded or whether the 4142 // operation completed despite cancellation. On successful cancellation, the 4143 // operation is not deleted; instead, it becomes an operation with an 4144 // Operation.error value with a google.rpc.Status.code of 1, corresponding to 4145 // `Code.CANCELLED`. 4146 // 4147 // - name: The name of the operation resource to be cancelled. 4148 func (r *ProjectsLocationsGlobalOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsGlobalOperationsCancelCall { 4149 c := &ProjectsLocationsGlobalOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4150 c.name = name 4151 c.canceloperationrequest = canceloperationrequest 4152 return c 4153 } 4154 4155 // Fields allows partial responses to be retrieved. See 4156 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4157 // details. 4158 func (c *ProjectsLocationsGlobalOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsCancelCall { 4159 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4160 return c 4161 } 4162 4163 // Context sets the context to be used in this call's Do method. 4164 func (c *ProjectsLocationsGlobalOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsCancelCall { 4165 c.ctx_ = ctx 4166 return c 4167 } 4168 4169 // Header returns a http.Header that can be modified by the caller to add 4170 // headers to the request. 4171 func (c *ProjectsLocationsGlobalOperationsCancelCall) Header() http.Header { 4172 if c.header_ == nil { 4173 c.header_ = make(http.Header) 4174 } 4175 return c.header_ 4176 } 4177 4178 func (c *ProjectsLocationsGlobalOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 4179 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4180 var body io.Reader = nil 4181 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 4182 if err != nil { 4183 return nil, err 4184 } 4185 c.urlParams_.Set("alt", alt) 4186 c.urlParams_.Set("prettyPrint", "false") 4187 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") 4188 urls += "?" + c.urlParams_.Encode() 4189 req, err := http.NewRequest("POST", urls, body) 4190 if err != nil { 4191 return nil, err 4192 } 4193 req.Header = reqHeaders 4194 googleapi.Expand(req.URL, map[string]string{ 4195 "name": c.name, 4196 }) 4197 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4198 } 4199 4200 // Do executes the "networkmanagement.projects.locations.global.operations.cancel" call. 4201 // Any non-2xx status code is an error. Response headers are in either 4202 // *Empty.ServerResponse.Header or (if a response was returned at all) in 4203 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4204 // whether the returned error was because http.StatusNotModified was returned. 4205 func (c *ProjectsLocationsGlobalOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4206 gensupport.SetOptions(c.urlParams_, opts...) 4207 res, err := c.doRequest("json") 4208 if res != nil && res.StatusCode == http.StatusNotModified { 4209 if res.Body != nil { 4210 res.Body.Close() 4211 } 4212 return nil, gensupport.WrapError(&googleapi.Error{ 4213 Code: res.StatusCode, 4214 Header: res.Header, 4215 }) 4216 } 4217 if err != nil { 4218 return nil, err 4219 } 4220 defer googleapi.CloseBody(res) 4221 if err := googleapi.CheckResponse(res); err != nil { 4222 return nil, gensupport.WrapError(err) 4223 } 4224 ret := &Empty{ 4225 ServerResponse: googleapi.ServerResponse{ 4226 Header: res.Header, 4227 HTTPStatusCode: res.StatusCode, 4228 }, 4229 } 4230 target := &ret 4231 if err := gensupport.DecodeResponse(target, res); err != nil { 4232 return nil, err 4233 } 4234 return ret, nil 4235 } 4236 4237 type ProjectsLocationsGlobalOperationsDeleteCall struct { 4238 s *Service 4239 name string 4240 urlParams_ gensupport.URLParams 4241 ctx_ context.Context 4242 header_ http.Header 4243 } 4244 4245 // Delete: Deletes a long-running operation. This method indicates that the 4246 // client is no longer interested in the operation result. It does not cancel 4247 // the operation. If the server doesn't support this method, it returns 4248 // `google.rpc.Code.UNIMPLEMENTED`. 4249 // 4250 // - name: The name of the operation resource to be deleted. 4251 func (r *ProjectsLocationsGlobalOperationsService) Delete(name string) *ProjectsLocationsGlobalOperationsDeleteCall { 4252 c := &ProjectsLocationsGlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4253 c.name = name 4254 return c 4255 } 4256 4257 // Fields allows partial responses to be retrieved. See 4258 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4259 // details. 4260 func (c *ProjectsLocationsGlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsDeleteCall { 4261 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4262 return c 4263 } 4264 4265 // Context sets the context to be used in this call's Do method. 4266 func (c *ProjectsLocationsGlobalOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsDeleteCall { 4267 c.ctx_ = ctx 4268 return c 4269 } 4270 4271 // Header returns a http.Header that can be modified by the caller to add 4272 // headers to the request. 4273 func (c *ProjectsLocationsGlobalOperationsDeleteCall) Header() http.Header { 4274 if c.header_ == nil { 4275 c.header_ = make(http.Header) 4276 } 4277 return c.header_ 4278 } 4279 4280 func (c *ProjectsLocationsGlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { 4281 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4282 var body io.Reader = nil 4283 c.urlParams_.Set("alt", alt) 4284 c.urlParams_.Set("prettyPrint", "false") 4285 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 4286 urls += "?" + c.urlParams_.Encode() 4287 req, err := http.NewRequest("DELETE", urls, body) 4288 if err != nil { 4289 return nil, err 4290 } 4291 req.Header = reqHeaders 4292 googleapi.Expand(req.URL, map[string]string{ 4293 "name": c.name, 4294 }) 4295 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4296 } 4297 4298 // Do executes the "networkmanagement.projects.locations.global.operations.delete" call. 4299 // Any non-2xx status code is an error. Response headers are in either 4300 // *Empty.ServerResponse.Header or (if a response was returned at all) in 4301 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4302 // whether the returned error was because http.StatusNotModified was returned. 4303 func (c *ProjectsLocationsGlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4304 gensupport.SetOptions(c.urlParams_, opts...) 4305 res, err := c.doRequest("json") 4306 if res != nil && res.StatusCode == http.StatusNotModified { 4307 if res.Body != nil { 4308 res.Body.Close() 4309 } 4310 return nil, gensupport.WrapError(&googleapi.Error{ 4311 Code: res.StatusCode, 4312 Header: res.Header, 4313 }) 4314 } 4315 if err != nil { 4316 return nil, err 4317 } 4318 defer googleapi.CloseBody(res) 4319 if err := googleapi.CheckResponse(res); err != nil { 4320 return nil, gensupport.WrapError(err) 4321 } 4322 ret := &Empty{ 4323 ServerResponse: googleapi.ServerResponse{ 4324 Header: res.Header, 4325 HTTPStatusCode: res.StatusCode, 4326 }, 4327 } 4328 target := &ret 4329 if err := gensupport.DecodeResponse(target, res); err != nil { 4330 return nil, err 4331 } 4332 return ret, nil 4333 } 4334 4335 type ProjectsLocationsGlobalOperationsGetCall struct { 4336 s *Service 4337 name string 4338 urlParams_ gensupport.URLParams 4339 ifNoneMatch_ string 4340 ctx_ context.Context 4341 header_ http.Header 4342 } 4343 4344 // Get: Gets the latest state of a long-running operation. Clients can use this 4345 // method to poll the operation result at intervals as recommended by the API 4346 // service. 4347 // 4348 // - name: The name of the operation resource. 4349 func (r *ProjectsLocationsGlobalOperationsService) Get(name string) *ProjectsLocationsGlobalOperationsGetCall { 4350 c := &ProjectsLocationsGlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4351 c.name = name 4352 return c 4353 } 4354 4355 // Fields allows partial responses to be retrieved. See 4356 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4357 // details. 4358 func (c *ProjectsLocationsGlobalOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsGetCall { 4359 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4360 return c 4361 } 4362 4363 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4364 // object's ETag matches the given value. This is useful for getting updates 4365 // only after the object has changed since the last request. 4366 func (c *ProjectsLocationsGlobalOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalOperationsGetCall { 4367 c.ifNoneMatch_ = entityTag 4368 return c 4369 } 4370 4371 // Context sets the context to be used in this call's Do method. 4372 func (c *ProjectsLocationsGlobalOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsGetCall { 4373 c.ctx_ = ctx 4374 return c 4375 } 4376 4377 // Header returns a http.Header that can be modified by the caller to add 4378 // headers to the request. 4379 func (c *ProjectsLocationsGlobalOperationsGetCall) Header() http.Header { 4380 if c.header_ == nil { 4381 c.header_ = make(http.Header) 4382 } 4383 return c.header_ 4384 } 4385 4386 func (c *ProjectsLocationsGlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { 4387 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4388 if c.ifNoneMatch_ != "" { 4389 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4390 } 4391 var body io.Reader = nil 4392 c.urlParams_.Set("alt", alt) 4393 c.urlParams_.Set("prettyPrint", "false") 4394 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 4395 urls += "?" + c.urlParams_.Encode() 4396 req, err := http.NewRequest("GET", urls, body) 4397 if err != nil { 4398 return nil, err 4399 } 4400 req.Header = reqHeaders 4401 googleapi.Expand(req.URL, map[string]string{ 4402 "name": c.name, 4403 }) 4404 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4405 } 4406 4407 // Do executes the "networkmanagement.projects.locations.global.operations.get" call. 4408 // Any non-2xx status code is an error. Response headers are in either 4409 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4410 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4411 // whether the returned error was because http.StatusNotModified was returned. 4412 func (c *ProjectsLocationsGlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4413 gensupport.SetOptions(c.urlParams_, opts...) 4414 res, err := c.doRequest("json") 4415 if res != nil && res.StatusCode == http.StatusNotModified { 4416 if res.Body != nil { 4417 res.Body.Close() 4418 } 4419 return nil, gensupport.WrapError(&googleapi.Error{ 4420 Code: res.StatusCode, 4421 Header: res.Header, 4422 }) 4423 } 4424 if err != nil { 4425 return nil, err 4426 } 4427 defer googleapi.CloseBody(res) 4428 if err := googleapi.CheckResponse(res); err != nil { 4429 return nil, gensupport.WrapError(err) 4430 } 4431 ret := &Operation{ 4432 ServerResponse: googleapi.ServerResponse{ 4433 Header: res.Header, 4434 HTTPStatusCode: res.StatusCode, 4435 }, 4436 } 4437 target := &ret 4438 if err := gensupport.DecodeResponse(target, res); err != nil { 4439 return nil, err 4440 } 4441 return ret, nil 4442 } 4443 4444 type ProjectsLocationsGlobalOperationsListCall struct { 4445 s *Service 4446 name string 4447 urlParams_ gensupport.URLParams 4448 ifNoneMatch_ string 4449 ctx_ context.Context 4450 header_ http.Header 4451 } 4452 4453 // List: Lists operations that match the specified filter in the request. If 4454 // the server doesn't support this method, it returns `UNIMPLEMENTED`. 4455 // 4456 // - name: The name of the operation's parent resource. 4457 func (r *ProjectsLocationsGlobalOperationsService) List(name string) *ProjectsLocationsGlobalOperationsListCall { 4458 c := &ProjectsLocationsGlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4459 c.name = name 4460 return c 4461 } 4462 4463 // Filter sets the optional parameter "filter": The standard list filter. 4464 func (c *ProjectsLocationsGlobalOperationsListCall) Filter(filter string) *ProjectsLocationsGlobalOperationsListCall { 4465 c.urlParams_.Set("filter", filter) 4466 return c 4467 } 4468 4469 // PageSize sets the optional parameter "pageSize": The standard list page 4470 // size. 4471 func (c *ProjectsLocationsGlobalOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalOperationsListCall { 4472 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4473 return c 4474 } 4475 4476 // PageToken sets the optional parameter "pageToken": The standard list page 4477 // token. 4478 func (c *ProjectsLocationsGlobalOperationsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalOperationsListCall { 4479 c.urlParams_.Set("pageToken", pageToken) 4480 return c 4481 } 4482 4483 // Fields allows partial responses to be retrieved. See 4484 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4485 // details. 4486 func (c *ProjectsLocationsGlobalOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsListCall { 4487 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4488 return c 4489 } 4490 4491 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4492 // object's ETag matches the given value. This is useful for getting updates 4493 // only after the object has changed since the last request. 4494 func (c *ProjectsLocationsGlobalOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalOperationsListCall { 4495 c.ifNoneMatch_ = entityTag 4496 return c 4497 } 4498 4499 // Context sets the context to be used in this call's Do method. 4500 func (c *ProjectsLocationsGlobalOperationsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsListCall { 4501 c.ctx_ = ctx 4502 return c 4503 } 4504 4505 // Header returns a http.Header that can be modified by the caller to add 4506 // headers to the request. 4507 func (c *ProjectsLocationsGlobalOperationsListCall) Header() http.Header { 4508 if c.header_ == nil { 4509 c.header_ = make(http.Header) 4510 } 4511 return c.header_ 4512 } 4513 4514 func (c *ProjectsLocationsGlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { 4515 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4516 if c.ifNoneMatch_ != "" { 4517 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4518 } 4519 var body io.Reader = nil 4520 c.urlParams_.Set("alt", alt) 4521 c.urlParams_.Set("prettyPrint", "false") 4522 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") 4523 urls += "?" + c.urlParams_.Encode() 4524 req, err := http.NewRequest("GET", urls, body) 4525 if err != nil { 4526 return nil, err 4527 } 4528 req.Header = reqHeaders 4529 googleapi.Expand(req.URL, map[string]string{ 4530 "name": c.name, 4531 }) 4532 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4533 } 4534 4535 // Do executes the "networkmanagement.projects.locations.global.operations.list" call. 4536 // Any non-2xx status code is an error. Response headers are in either 4537 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned 4538 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4539 // check whether the returned error was because http.StatusNotModified was 4540 // returned. 4541 func (c *ProjectsLocationsGlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 4542 gensupport.SetOptions(c.urlParams_, opts...) 4543 res, err := c.doRequest("json") 4544 if res != nil && res.StatusCode == http.StatusNotModified { 4545 if res.Body != nil { 4546 res.Body.Close() 4547 } 4548 return nil, gensupport.WrapError(&googleapi.Error{ 4549 Code: res.StatusCode, 4550 Header: res.Header, 4551 }) 4552 } 4553 if err != nil { 4554 return nil, err 4555 } 4556 defer googleapi.CloseBody(res) 4557 if err := googleapi.CheckResponse(res); err != nil { 4558 return nil, gensupport.WrapError(err) 4559 } 4560 ret := &ListOperationsResponse{ 4561 ServerResponse: googleapi.ServerResponse{ 4562 Header: res.Header, 4563 HTTPStatusCode: res.StatusCode, 4564 }, 4565 } 4566 target := &ret 4567 if err := gensupport.DecodeResponse(target, res); err != nil { 4568 return nil, err 4569 } 4570 return ret, nil 4571 } 4572 4573 // Pages invokes f for each page of results. 4574 // A non-nil error returned from f will halt the iteration. 4575 // The provided context supersedes any context provided to the Context method. 4576 func (c *ProjectsLocationsGlobalOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 4577 c.ctx_ = ctx 4578 defer c.PageToken(c.urlParams_.Get("pageToken")) 4579 for { 4580 x, err := c.Do() 4581 if err != nil { 4582 return err 4583 } 4584 if err := f(x); err != nil { 4585 return err 4586 } 4587 if x.NextPageToken == "" { 4588 return nil 4589 } 4590 c.PageToken(x.NextPageToken) 4591 } 4592 } 4593