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/v1" 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/v1" 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:v1" 90 const apiName = "networkmanagement" 91 const apiVersion = "v1" 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_id}` 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. 2535 // "ARRIVE_AT_EXTERNAL_LOAD_BALANCER" - Forwarding state: arriving at a 2536 // Compute Engine external load balancer. 2537 // "ARRIVE_AT_VPN_GATEWAY" - Forwarding state: arriving at a Cloud VPN 2538 // gateway. 2539 // "ARRIVE_AT_VPN_TUNNEL" - Forwarding state: arriving at a Cloud VPN tunnel. 2540 // "ARRIVE_AT_VPC_CONNECTOR" - Forwarding state: arriving at a VPC connector. 2541 // "NAT" - Transition state: packet header translated. 2542 // "PROXY_CONNECTION" - Transition state: original connection is terminated 2543 // and a new proxied connection is initiated. 2544 // "DELIVER" - Final state: packet could be delivered. 2545 // "DROP" - Final state: packet could be dropped. 2546 // "FORWARD" - Final state: packet could be forwarded to a network with an 2547 // unknown configuration. 2548 // "ABORT" - Final state: analysis is aborted. 2549 // "VIEWER_PERMISSION_MISSING" - Special state: viewer of the test result 2550 // does not have permission to see the configuration in this step. 2551 State string `json:"state,omitempty"` 2552 // StorageBucket: Display information of a Storage Bucket. Used only for return 2553 // traces. 2554 StorageBucket *StorageBucketInfo `json:"storageBucket,omitempty"` 2555 // VpcConnector: Display information of a VPC connector. 2556 VpcConnector *VpcConnectorInfo `json:"vpcConnector,omitempty"` 2557 // VpnGateway: Display information of a Compute Engine VPN gateway. 2558 VpnGateway *VpnGatewayInfo `json:"vpnGateway,omitempty"` 2559 // VpnTunnel: Display information of a Compute Engine VPN tunnel. 2560 VpnTunnel *VpnTunnelInfo `json:"vpnTunnel,omitempty"` 2561 // ForceSendFields is a list of field names (e.g. "Abort") to unconditionally 2562 // include in API requests. By default, fields with empty or default values are 2563 // omitted from API requests. See 2564 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2565 // details. 2566 ForceSendFields []string `json:"-"` 2567 // NullFields is a list of field names (e.g. "Abort") to include in API 2568 // requests with the JSON null value. By default, fields with empty values are 2569 // omitted from API requests. See 2570 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2571 NullFields []string `json:"-"` 2572 } 2573 2574 func (s *Step) MarshalJSON() ([]byte, error) { 2575 type NoMethod Step 2576 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2577 } 2578 2579 // StorageBucketInfo: For display only. Metadata associated with Storage 2580 // Bucket. 2581 type StorageBucketInfo struct { 2582 // Bucket: Cloud Storage Bucket name. 2583 Bucket string `json:"bucket,omitempty"` 2584 // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally 2585 // include in API requests. By default, fields with empty or default values are 2586 // omitted from API requests. See 2587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2588 // details. 2589 ForceSendFields []string `json:"-"` 2590 // NullFields is a list of field names (e.g. "Bucket") to include in API 2591 // requests with the JSON null value. By default, fields with empty values are 2592 // omitted from API requests. See 2593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2594 NullFields []string `json:"-"` 2595 } 2596 2597 func (s *StorageBucketInfo) MarshalJSON() ([]byte, error) { 2598 type NoMethod StorageBucketInfo 2599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2600 } 2601 2602 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method. 2603 type TestIamPermissionsRequest struct { 2604 // Permissions: The set of permissions to check for the `resource`. Permissions 2605 // with wildcards (such as `*` or `storage.*`) are not allowed. For more 2606 // information see IAM Overview 2607 // (https://cloud.google.com/iam/docs/overview#permissions). 2608 Permissions []string `json:"permissions,omitempty"` 2609 // ForceSendFields is a list of field names (e.g. "Permissions") to 2610 // unconditionally include in API requests. By default, fields with empty or 2611 // default values are omitted from API requests. See 2612 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2613 // details. 2614 ForceSendFields []string `json:"-"` 2615 // NullFields is a list of field names (e.g. "Permissions") to include in API 2616 // requests with the JSON null value. By default, fields with empty values are 2617 // omitted from API requests. See 2618 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2619 NullFields []string `json:"-"` 2620 } 2621 2622 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 2623 type NoMethod TestIamPermissionsRequest 2624 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2625 } 2626 2627 // TestIamPermissionsResponse: Response message for `TestIamPermissions` 2628 // method. 2629 type TestIamPermissionsResponse struct { 2630 // Permissions: A subset of `TestPermissionsRequest.permissions` that the 2631 // caller is allowed. 2632 Permissions []string `json:"permissions,omitempty"` 2633 2634 // ServerResponse contains the HTTP response code and headers from the server. 2635 googleapi.ServerResponse `json:"-"` 2636 // ForceSendFields is a list of field names (e.g. "Permissions") to 2637 // unconditionally include in API requests. By default, fields with empty or 2638 // default values are omitted from API requests. See 2639 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2640 // details. 2641 ForceSendFields []string `json:"-"` 2642 // NullFields is a list of field names (e.g. "Permissions") to include in API 2643 // requests with the JSON null value. By default, fields with empty values are 2644 // omitted from API requests. See 2645 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2646 NullFields []string `json:"-"` 2647 } 2648 2649 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 2650 type NoMethod TestIamPermissionsResponse 2651 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2652 } 2653 2654 // Trace: Trace represents one simulated packet forwarding path. * Each trace 2655 // contains multiple ordered steps. * Each step is in a particular state with 2656 // associated configuration. * State is categorized as final or non-final 2657 // states. * Each final state has a reason associated. * Each trace must end 2658 // with a final state (the last step). ``` 2659 // |---------------------Trace----------------------| Step1(State) Step2(State) 2660 // --- StepN(State(final)) ``` 2661 type Trace struct { 2662 // EndpointInfo: Derived from the source and destination endpoints definition 2663 // specified by user request, and validated by the data plane model. If there 2664 // are multiple traces starting from different source locations, then the 2665 // endpoint_info may be different between traces. 2666 EndpointInfo *EndpointInfo `json:"endpointInfo,omitempty"` 2667 // ForwardTraceId: ID of trace. For forward traces, this ID is unique for each 2668 // trace. For return traces, it matches ID of associated forward trace. A 2669 // single forward trace can be associated with none, one or more than one 2670 // return trace. 2671 ForwardTraceId int64 `json:"forwardTraceId,omitempty"` 2672 // Steps: A trace of a test contains multiple steps from the initial state to 2673 // the final state (delivered, dropped, forwarded, or aborted). The steps are 2674 // ordered by the processing sequence within the simulated network state 2675 // machine. It is critical to preserve the order of the steps and avoid 2676 // reordering or sorting them. 2677 Steps []*Step `json:"steps,omitempty"` 2678 // ForceSendFields is a list of field names (e.g. "EndpointInfo") to 2679 // unconditionally include in API requests. By default, fields with empty or 2680 // default values are omitted from API requests. See 2681 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2682 // details. 2683 ForceSendFields []string `json:"-"` 2684 // NullFields is a list of field names (e.g. "EndpointInfo") to include in API 2685 // requests with the JSON null value. By default, fields with empty values are 2686 // omitted from API requests. See 2687 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2688 NullFields []string `json:"-"` 2689 } 2690 2691 func (s *Trace) MarshalJSON() ([]byte, error) { 2692 type NoMethod Trace 2693 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2694 } 2695 2696 // VpcConnectorInfo: For display only. Metadata associated with a VPC 2697 // connector. 2698 type VpcConnectorInfo struct { 2699 // DisplayName: Name of a VPC connector. 2700 DisplayName string `json:"displayName,omitempty"` 2701 // Location: Location in which the VPC connector is deployed. 2702 Location string `json:"location,omitempty"` 2703 // Uri: URI of a VPC connector. 2704 Uri string `json:"uri,omitempty"` 2705 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2706 // unconditionally include in API requests. By default, fields with empty or 2707 // default values are omitted from API requests. See 2708 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2709 // details. 2710 ForceSendFields []string `json:"-"` 2711 // NullFields is a list of field names (e.g. "DisplayName") to include in API 2712 // requests with the JSON null value. By default, fields with empty values are 2713 // omitted from API requests. See 2714 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2715 NullFields []string `json:"-"` 2716 } 2717 2718 func (s *VpcConnectorInfo) MarshalJSON() ([]byte, error) { 2719 type NoMethod VpcConnectorInfo 2720 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2721 } 2722 2723 // VpnGatewayInfo: For display only. Metadata associated with a Compute Engine 2724 // VPN gateway. 2725 type VpnGatewayInfo struct { 2726 // DisplayName: Name of a VPN gateway. 2727 DisplayName string `json:"displayName,omitempty"` 2728 // IpAddress: IP address of the VPN gateway. 2729 IpAddress string `json:"ipAddress,omitempty"` 2730 // NetworkUri: URI of a Compute Engine network where the VPN gateway is 2731 // configured. 2732 NetworkUri string `json:"networkUri,omitempty"` 2733 // Region: Name of a Google Cloud region where this VPN gateway is configured. 2734 Region string `json:"region,omitempty"` 2735 // Uri: URI of a VPN gateway. 2736 Uri string `json:"uri,omitempty"` 2737 // VpnTunnelUri: A VPN tunnel that is associated with this VPN gateway. There 2738 // may be multiple VPN tunnels configured on a VPN gateway, and only the one 2739 // relevant to the test is displayed. 2740 VpnTunnelUri string `json:"vpnTunnelUri,omitempty"` 2741 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2742 // unconditionally include in API requests. By default, fields with empty or 2743 // default values are omitted from API requests. See 2744 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2745 // details. 2746 ForceSendFields []string `json:"-"` 2747 // NullFields is a list of field names (e.g. "DisplayName") to include in API 2748 // requests with the JSON null value. By default, fields with empty values are 2749 // omitted from API requests. See 2750 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2751 NullFields []string `json:"-"` 2752 } 2753 2754 func (s *VpnGatewayInfo) MarshalJSON() ([]byte, error) { 2755 type NoMethod VpnGatewayInfo 2756 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2757 } 2758 2759 // VpnTunnelInfo: For display only. Metadata associated with a Compute Engine 2760 // VPN tunnel. 2761 type VpnTunnelInfo struct { 2762 // DisplayName: Name of a VPN tunnel. 2763 DisplayName string `json:"displayName,omitempty"` 2764 // NetworkUri: URI of a Compute Engine network where the VPN tunnel is 2765 // configured. 2766 NetworkUri string `json:"networkUri,omitempty"` 2767 // Region: Name of a Google Cloud region where this VPN tunnel is configured. 2768 Region string `json:"region,omitempty"` 2769 // RemoteGateway: URI of a VPN gateway at remote end of the tunnel. 2770 RemoteGateway string `json:"remoteGateway,omitempty"` 2771 // RemoteGatewayIp: Remote VPN gateway's IP address. 2772 RemoteGatewayIp string `json:"remoteGatewayIp,omitempty"` 2773 // RoutingType: Type of the routing policy. 2774 // 2775 // Possible values: 2776 // "ROUTING_TYPE_UNSPECIFIED" - Unspecified type. Default value. 2777 // "ROUTE_BASED" - Route based VPN. 2778 // "POLICY_BASED" - Policy based routing. 2779 // "DYNAMIC" - Dynamic (BGP) routing. 2780 RoutingType string `json:"routingType,omitempty"` 2781 // SourceGateway: URI of the VPN gateway at local end of the tunnel. 2782 SourceGateway string `json:"sourceGateway,omitempty"` 2783 // SourceGatewayIp: Local VPN gateway's IP address. 2784 SourceGatewayIp string `json:"sourceGatewayIp,omitempty"` 2785 // Uri: URI of a VPN tunnel. 2786 Uri string `json:"uri,omitempty"` 2787 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2788 // unconditionally include in API requests. By default, fields with empty or 2789 // default values are omitted from API requests. See 2790 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2791 // details. 2792 ForceSendFields []string `json:"-"` 2793 // NullFields is a list of field names (e.g. "DisplayName") to include in API 2794 // requests with the JSON null value. By default, fields with empty values are 2795 // omitted from API requests. See 2796 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2797 NullFields []string `json:"-"` 2798 } 2799 2800 func (s *VpnTunnelInfo) MarshalJSON() ([]byte, error) { 2801 type NoMethod VpnTunnelInfo 2802 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2803 } 2804 2805 type ProjectsLocationsGetCall struct { 2806 s *Service 2807 name string 2808 urlParams_ gensupport.URLParams 2809 ifNoneMatch_ string 2810 ctx_ context.Context 2811 header_ http.Header 2812 } 2813 2814 // Get: Gets information about a location. 2815 // 2816 // - name: Resource name for the location. 2817 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 2818 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2819 c.name = name 2820 return c 2821 } 2822 2823 // Fields allows partial responses to be retrieved. See 2824 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2825 // details. 2826 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 2827 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2828 return c 2829 } 2830 2831 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2832 // object's ETag matches the given value. This is useful for getting updates 2833 // only after the object has changed since the last request. 2834 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 2835 c.ifNoneMatch_ = entityTag 2836 return c 2837 } 2838 2839 // Context sets the context to be used in this call's Do method. 2840 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 2841 c.ctx_ = ctx 2842 return c 2843 } 2844 2845 // Header returns a http.Header that can be modified by the caller to add 2846 // headers to the request. 2847 func (c *ProjectsLocationsGetCall) Header() http.Header { 2848 if c.header_ == nil { 2849 c.header_ = make(http.Header) 2850 } 2851 return c.header_ 2852 } 2853 2854 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 2855 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2856 if c.ifNoneMatch_ != "" { 2857 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2858 } 2859 var body io.Reader = nil 2860 c.urlParams_.Set("alt", alt) 2861 c.urlParams_.Set("prettyPrint", "false") 2862 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 2863 urls += "?" + c.urlParams_.Encode() 2864 req, err := http.NewRequest("GET", urls, body) 2865 if err != nil { 2866 return nil, err 2867 } 2868 req.Header = reqHeaders 2869 googleapi.Expand(req.URL, map[string]string{ 2870 "name": c.name, 2871 }) 2872 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2873 } 2874 2875 // Do executes the "networkmanagement.projects.locations.get" call. 2876 // Any non-2xx status code is an error. Response headers are in either 2877 // *Location.ServerResponse.Header or (if a response was returned at all) in 2878 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2879 // whether the returned error was because http.StatusNotModified was returned. 2880 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 2881 gensupport.SetOptions(c.urlParams_, opts...) 2882 res, err := c.doRequest("json") 2883 if res != nil && res.StatusCode == http.StatusNotModified { 2884 if res.Body != nil { 2885 res.Body.Close() 2886 } 2887 return nil, gensupport.WrapError(&googleapi.Error{ 2888 Code: res.StatusCode, 2889 Header: res.Header, 2890 }) 2891 } 2892 if err != nil { 2893 return nil, err 2894 } 2895 defer googleapi.CloseBody(res) 2896 if err := googleapi.CheckResponse(res); err != nil { 2897 return nil, gensupport.WrapError(err) 2898 } 2899 ret := &Location{ 2900 ServerResponse: googleapi.ServerResponse{ 2901 Header: res.Header, 2902 HTTPStatusCode: res.StatusCode, 2903 }, 2904 } 2905 target := &ret 2906 if err := gensupport.DecodeResponse(target, res); err != nil { 2907 return nil, err 2908 } 2909 return ret, nil 2910 } 2911 2912 type ProjectsLocationsListCall struct { 2913 s *Service 2914 name string 2915 urlParams_ gensupport.URLParams 2916 ifNoneMatch_ string 2917 ctx_ context.Context 2918 header_ http.Header 2919 } 2920 2921 // List: Lists information about the supported locations for this service. 2922 // 2923 // - name: The resource that owns the locations collection, if applicable. 2924 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 2925 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2926 c.name = name 2927 return c 2928 } 2929 2930 // Filter sets the optional parameter "filter": A filter to narrow down results 2931 // to a preferred subset. The filtering language accepts strings like 2932 // "displayName=tokyo", and is documented in more detail in AIP-160 2933 // (https://google.aip.dev/160). 2934 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 2935 c.urlParams_.Set("filter", filter) 2936 return c 2937 } 2938 2939 // PageSize sets the optional parameter "pageSize": The maximum number of 2940 // results to return. If not set, the service selects a default. 2941 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 2942 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 2943 return c 2944 } 2945 2946 // PageToken sets the optional parameter "pageToken": A page token received 2947 // from the `next_page_token` field in the response. Send that page token to 2948 // receive the subsequent page. 2949 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 2950 c.urlParams_.Set("pageToken", pageToken) 2951 return c 2952 } 2953 2954 // Fields allows partial responses to be retrieved. See 2955 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2956 // details. 2957 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 2958 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2959 return c 2960 } 2961 2962 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2963 // object's ETag matches the given value. This is useful for getting updates 2964 // only after the object has changed since the last request. 2965 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 2966 c.ifNoneMatch_ = entityTag 2967 return c 2968 } 2969 2970 // Context sets the context to be used in this call's Do method. 2971 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 2972 c.ctx_ = ctx 2973 return c 2974 } 2975 2976 // Header returns a http.Header that can be modified by the caller to add 2977 // headers to the request. 2978 func (c *ProjectsLocationsListCall) Header() http.Header { 2979 if c.header_ == nil { 2980 c.header_ = make(http.Header) 2981 } 2982 return c.header_ 2983 } 2984 2985 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 2986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2987 if c.ifNoneMatch_ != "" { 2988 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2989 } 2990 var body io.Reader = nil 2991 c.urlParams_.Set("alt", alt) 2992 c.urlParams_.Set("prettyPrint", "false") 2993 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") 2994 urls += "?" + c.urlParams_.Encode() 2995 req, err := http.NewRequest("GET", urls, body) 2996 if err != nil { 2997 return nil, err 2998 } 2999 req.Header = reqHeaders 3000 googleapi.Expand(req.URL, map[string]string{ 3001 "name": c.name, 3002 }) 3003 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3004 } 3005 3006 // Do executes the "networkmanagement.projects.locations.list" call. 3007 // Any non-2xx status code is an error. Response headers are in either 3008 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned 3009 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3010 // check whether the returned error was because http.StatusNotModified was 3011 // returned. 3012 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 3013 gensupport.SetOptions(c.urlParams_, opts...) 3014 res, err := c.doRequest("json") 3015 if res != nil && res.StatusCode == http.StatusNotModified { 3016 if res.Body != nil { 3017 res.Body.Close() 3018 } 3019 return nil, gensupport.WrapError(&googleapi.Error{ 3020 Code: res.StatusCode, 3021 Header: res.Header, 3022 }) 3023 } 3024 if err != nil { 3025 return nil, err 3026 } 3027 defer googleapi.CloseBody(res) 3028 if err := googleapi.CheckResponse(res); err != nil { 3029 return nil, gensupport.WrapError(err) 3030 } 3031 ret := &ListLocationsResponse{ 3032 ServerResponse: googleapi.ServerResponse{ 3033 Header: res.Header, 3034 HTTPStatusCode: res.StatusCode, 3035 }, 3036 } 3037 target := &ret 3038 if err := gensupport.DecodeResponse(target, res); err != nil { 3039 return nil, err 3040 } 3041 return ret, nil 3042 } 3043 3044 // Pages invokes f for each page of results. 3045 // A non-nil error returned from f will halt the iteration. 3046 // The provided context supersedes any context provided to the Context method. 3047 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 3048 c.ctx_ = ctx 3049 defer c.PageToken(c.urlParams_.Get("pageToken")) 3050 for { 3051 x, err := c.Do() 3052 if err != nil { 3053 return err 3054 } 3055 if err := f(x); err != nil { 3056 return err 3057 } 3058 if x.NextPageToken == "" { 3059 return nil 3060 } 3061 c.PageToken(x.NextPageToken) 3062 } 3063 } 3064 3065 type ProjectsLocationsGlobalConnectivityTestsCreateCall struct { 3066 s *Service 3067 parent string 3068 connectivitytest *ConnectivityTest 3069 urlParams_ gensupport.URLParams 3070 ctx_ context.Context 3071 header_ http.Header 3072 } 3073 3074 // Create: Creates a new Connectivity Test. After you create a test, the 3075 // reachability analysis is performed as part of the long running operation, 3076 // which completes when the analysis completes. If the endpoint specifications 3077 // in `ConnectivityTest` are invalid (for example, containing non-existent 3078 // resources in the network, or you don't have read permissions to the network 3079 // configurations of listed projects), then the reachability result returns a 3080 // value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are 3081 // incomplete, the reachability result returns a value of AMBIGUOUS. For more 3082 // information, see the Connectivity Test documentation. 3083 // 3084 // - parent: The parent resource of the Connectivity Test to create: 3085 // `projects/{project_id}/locations/global`. 3086 func (r *ProjectsLocationsGlobalConnectivityTestsService) Create(parent string, connectivitytest *ConnectivityTest) *ProjectsLocationsGlobalConnectivityTestsCreateCall { 3087 c := &ProjectsLocationsGlobalConnectivityTestsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3088 c.parent = parent 3089 c.connectivitytest = connectivitytest 3090 return c 3091 } 3092 3093 // TestId sets the optional parameter "testId": Required. The logical name of 3094 // the Connectivity Test in your project with the following restrictions: * 3095 // Must contain only lowercase letters, numbers, and hyphens. * Must start with 3096 // a letter. * Must be between 1-40 characters. * Must end with a number or a 3097 // letter. * Must be unique within the customer project 3098 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) TestId(testId string) *ProjectsLocationsGlobalConnectivityTestsCreateCall { 3099 c.urlParams_.Set("testId", testId) 3100 return c 3101 } 3102 3103 // Fields allows partial responses to be retrieved. See 3104 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3105 // details. 3106 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsCreateCall { 3107 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3108 return c 3109 } 3110 3111 // Context sets the context to be used in this call's Do method. 3112 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsCreateCall { 3113 c.ctx_ = ctx 3114 return c 3115 } 3116 3117 // Header returns a http.Header that can be modified by the caller to add 3118 // headers to the request. 3119 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) Header() http.Header { 3120 if c.header_ == nil { 3121 c.header_ = make(http.Header) 3122 } 3123 return c.header_ 3124 } 3125 3126 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) doRequest(alt string) (*http.Response, error) { 3127 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3128 var body io.Reader = nil 3129 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectivitytest) 3130 if err != nil { 3131 return nil, err 3132 } 3133 c.urlParams_.Set("alt", alt) 3134 c.urlParams_.Set("prettyPrint", "false") 3135 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connectivityTests") 3136 urls += "?" + c.urlParams_.Encode() 3137 req, err := http.NewRequest("POST", urls, body) 3138 if err != nil { 3139 return nil, err 3140 } 3141 req.Header = reqHeaders 3142 googleapi.Expand(req.URL, map[string]string{ 3143 "parent": c.parent, 3144 }) 3145 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3146 } 3147 3148 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.create" call. 3149 // Any non-2xx status code is an error. Response headers are in either 3150 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3151 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3152 // whether the returned error was because http.StatusNotModified was returned. 3153 func (c *ProjectsLocationsGlobalConnectivityTestsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3154 gensupport.SetOptions(c.urlParams_, opts...) 3155 res, err := c.doRequest("json") 3156 if res != nil && res.StatusCode == http.StatusNotModified { 3157 if res.Body != nil { 3158 res.Body.Close() 3159 } 3160 return nil, gensupport.WrapError(&googleapi.Error{ 3161 Code: res.StatusCode, 3162 Header: res.Header, 3163 }) 3164 } 3165 if err != nil { 3166 return nil, err 3167 } 3168 defer googleapi.CloseBody(res) 3169 if err := googleapi.CheckResponse(res); err != nil { 3170 return nil, gensupport.WrapError(err) 3171 } 3172 ret := &Operation{ 3173 ServerResponse: googleapi.ServerResponse{ 3174 Header: res.Header, 3175 HTTPStatusCode: res.StatusCode, 3176 }, 3177 } 3178 target := &ret 3179 if err := gensupport.DecodeResponse(target, res); err != nil { 3180 return nil, err 3181 } 3182 return ret, nil 3183 } 3184 3185 type ProjectsLocationsGlobalConnectivityTestsDeleteCall struct { 3186 s *Service 3187 name string 3188 urlParams_ gensupport.URLParams 3189 ctx_ context.Context 3190 header_ http.Header 3191 } 3192 3193 // Delete: Deletes a specific `ConnectivityTest`. 3194 // 3195 // - name: Connectivity Test resource name using the form: 3196 // `projects/{project_id}/locations/global/connectivityTests/{test_id}`. 3197 func (r *ProjectsLocationsGlobalConnectivityTestsService) Delete(name string) *ProjectsLocationsGlobalConnectivityTestsDeleteCall { 3198 c := &ProjectsLocationsGlobalConnectivityTestsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3199 c.name = name 3200 return c 3201 } 3202 3203 // Fields allows partial responses to be retrieved. See 3204 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3205 // details. 3206 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsDeleteCall { 3207 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3208 return c 3209 } 3210 3211 // Context sets the context to be used in this call's Do method. 3212 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsDeleteCall { 3213 c.ctx_ = ctx 3214 return c 3215 } 3216 3217 // Header returns a http.Header that can be modified by the caller to add 3218 // headers to the request. 3219 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) Header() http.Header { 3220 if c.header_ == nil { 3221 c.header_ = make(http.Header) 3222 } 3223 return c.header_ 3224 } 3225 3226 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) doRequest(alt string) (*http.Response, error) { 3227 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3228 var body io.Reader = nil 3229 c.urlParams_.Set("alt", alt) 3230 c.urlParams_.Set("prettyPrint", "false") 3231 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3232 urls += "?" + c.urlParams_.Encode() 3233 req, err := http.NewRequest("DELETE", urls, body) 3234 if err != nil { 3235 return nil, err 3236 } 3237 req.Header = reqHeaders 3238 googleapi.Expand(req.URL, map[string]string{ 3239 "name": c.name, 3240 }) 3241 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3242 } 3243 3244 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.delete" call. 3245 // Any non-2xx status code is an error. Response headers are in either 3246 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3247 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3248 // whether the returned error was because http.StatusNotModified was returned. 3249 func (c *ProjectsLocationsGlobalConnectivityTestsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3250 gensupport.SetOptions(c.urlParams_, opts...) 3251 res, err := c.doRequest("json") 3252 if res != nil && res.StatusCode == http.StatusNotModified { 3253 if res.Body != nil { 3254 res.Body.Close() 3255 } 3256 return nil, gensupport.WrapError(&googleapi.Error{ 3257 Code: res.StatusCode, 3258 Header: res.Header, 3259 }) 3260 } 3261 if err != nil { 3262 return nil, err 3263 } 3264 defer googleapi.CloseBody(res) 3265 if err := googleapi.CheckResponse(res); err != nil { 3266 return nil, gensupport.WrapError(err) 3267 } 3268 ret := &Operation{ 3269 ServerResponse: googleapi.ServerResponse{ 3270 Header: res.Header, 3271 HTTPStatusCode: res.StatusCode, 3272 }, 3273 } 3274 target := &ret 3275 if err := gensupport.DecodeResponse(target, res); err != nil { 3276 return nil, err 3277 } 3278 return ret, nil 3279 } 3280 3281 type ProjectsLocationsGlobalConnectivityTestsGetCall struct { 3282 s *Service 3283 name string 3284 urlParams_ gensupport.URLParams 3285 ifNoneMatch_ string 3286 ctx_ context.Context 3287 header_ http.Header 3288 } 3289 3290 // Get: Gets the details of a specific Connectivity Test. 3291 // 3292 // - name: `ConnectivityTest` resource name using the form: 3293 // `projects/{project_id}/locations/global/connectivityTests/{test_id}`. 3294 func (r *ProjectsLocationsGlobalConnectivityTestsService) Get(name string) *ProjectsLocationsGlobalConnectivityTestsGetCall { 3295 c := &ProjectsLocationsGlobalConnectivityTestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3296 c.name = name 3297 return c 3298 } 3299 3300 // Fields allows partial responses to be retrieved. See 3301 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3302 // details. 3303 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsGetCall { 3304 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3305 return c 3306 } 3307 3308 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3309 // object's ETag matches the given value. This is useful for getting updates 3310 // only after the object has changed since the last request. 3311 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalConnectivityTestsGetCall { 3312 c.ifNoneMatch_ = entityTag 3313 return c 3314 } 3315 3316 // Context sets the context to be used in this call's Do method. 3317 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsGetCall { 3318 c.ctx_ = ctx 3319 return c 3320 } 3321 3322 // Header returns a http.Header that can be modified by the caller to add 3323 // headers to the request. 3324 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) Header() http.Header { 3325 if c.header_ == nil { 3326 c.header_ = make(http.Header) 3327 } 3328 return c.header_ 3329 } 3330 3331 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) doRequest(alt string) (*http.Response, error) { 3332 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3333 if c.ifNoneMatch_ != "" { 3334 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3335 } 3336 var body io.Reader = nil 3337 c.urlParams_.Set("alt", alt) 3338 c.urlParams_.Set("prettyPrint", "false") 3339 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3340 urls += "?" + c.urlParams_.Encode() 3341 req, err := http.NewRequest("GET", urls, body) 3342 if err != nil { 3343 return nil, err 3344 } 3345 req.Header = reqHeaders 3346 googleapi.Expand(req.URL, map[string]string{ 3347 "name": c.name, 3348 }) 3349 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3350 } 3351 3352 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.get" call. 3353 // Any non-2xx status code is an error. Response headers are in either 3354 // *ConnectivityTest.ServerResponse.Header or (if a response was returned at 3355 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3356 // check whether the returned error was because http.StatusNotModified was 3357 // returned. 3358 func (c *ProjectsLocationsGlobalConnectivityTestsGetCall) Do(opts ...googleapi.CallOption) (*ConnectivityTest, error) { 3359 gensupport.SetOptions(c.urlParams_, opts...) 3360 res, err := c.doRequest("json") 3361 if res != nil && res.StatusCode == http.StatusNotModified { 3362 if res.Body != nil { 3363 res.Body.Close() 3364 } 3365 return nil, gensupport.WrapError(&googleapi.Error{ 3366 Code: res.StatusCode, 3367 Header: res.Header, 3368 }) 3369 } 3370 if err != nil { 3371 return nil, err 3372 } 3373 defer googleapi.CloseBody(res) 3374 if err := googleapi.CheckResponse(res); err != nil { 3375 return nil, gensupport.WrapError(err) 3376 } 3377 ret := &ConnectivityTest{ 3378 ServerResponse: googleapi.ServerResponse{ 3379 Header: res.Header, 3380 HTTPStatusCode: res.StatusCode, 3381 }, 3382 } 3383 target := &ret 3384 if err := gensupport.DecodeResponse(target, res); err != nil { 3385 return nil, err 3386 } 3387 return ret, nil 3388 } 3389 3390 type ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall struct { 3391 s *Service 3392 resource string 3393 urlParams_ gensupport.URLParams 3394 ifNoneMatch_ string 3395 ctx_ context.Context 3396 header_ http.Header 3397 } 3398 3399 // GetIamPolicy: Gets the access control policy for a resource. Returns an 3400 // empty policy if the resource exists and does not have a policy set. 3401 // 3402 // - resource: REQUIRED: The resource for which the policy is being requested. 3403 // See Resource names (https://cloud.google.com/apis/design/resource_names) 3404 // for the appropriate value for this field. 3405 func (r *ProjectsLocationsGlobalConnectivityTestsService) GetIamPolicy(resource string) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3406 c := &ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3407 c.resource = resource 3408 return c 3409 } 3410 3411 // OptionsRequestedPolicyVersion sets the optional parameter 3412 // "options.requestedPolicyVersion": The maximum policy version that will be 3413 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying 3414 // an invalid value will be rejected. Requests for policies with any 3415 // conditional role bindings must specify version 3. Policies with no 3416 // conditional role bindings may specify any valid value or leave the field 3417 // unset. The policy in the response might use the policy version that you 3418 // specified, or it might use a lower policy version. For example, if you 3419 // specify version 3, but the policy has no conditional role bindings, the 3420 // response uses version 1. To learn which resources support conditions in 3421 // their IAM policies, see the IAM documentation 3422 // (https://cloud.google.com/iam/help/conditions/resource-policies). 3423 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3424 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 3425 return c 3426 } 3427 3428 // Fields allows partial responses to be retrieved. See 3429 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3430 // details. 3431 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3432 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3433 return c 3434 } 3435 3436 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3437 // object's ETag matches the given value. This is useful for getting updates 3438 // only after the object has changed since the last request. 3439 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3440 c.ifNoneMatch_ = entityTag 3441 return c 3442 } 3443 3444 // Context sets the context to be used in this call's Do method. 3445 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall { 3446 c.ctx_ = ctx 3447 return c 3448 } 3449 3450 // Header returns a http.Header that can be modified by the caller to add 3451 // headers to the request. 3452 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) Header() http.Header { 3453 if c.header_ == nil { 3454 c.header_ = make(http.Header) 3455 } 3456 return c.header_ 3457 } 3458 3459 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3460 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3461 if c.ifNoneMatch_ != "" { 3462 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3463 } 3464 var body io.Reader = nil 3465 c.urlParams_.Set("alt", alt) 3466 c.urlParams_.Set("prettyPrint", "false") 3467 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 3468 urls += "?" + c.urlParams_.Encode() 3469 req, err := http.NewRequest("GET", urls, body) 3470 if err != nil { 3471 return nil, err 3472 } 3473 req.Header = reqHeaders 3474 googleapi.Expand(req.URL, map[string]string{ 3475 "resource": c.resource, 3476 }) 3477 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3478 } 3479 3480 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.getIamPolicy" call. 3481 // Any non-2xx status code is an error. Response headers are in either 3482 // *Policy.ServerResponse.Header or (if a response was returned at all) in 3483 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3484 // whether the returned error was because http.StatusNotModified was returned. 3485 func (c *ProjectsLocationsGlobalConnectivityTestsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3486 gensupport.SetOptions(c.urlParams_, opts...) 3487 res, err := c.doRequest("json") 3488 if res != nil && res.StatusCode == http.StatusNotModified { 3489 if res.Body != nil { 3490 res.Body.Close() 3491 } 3492 return nil, gensupport.WrapError(&googleapi.Error{ 3493 Code: res.StatusCode, 3494 Header: res.Header, 3495 }) 3496 } 3497 if err != nil { 3498 return nil, err 3499 } 3500 defer googleapi.CloseBody(res) 3501 if err := googleapi.CheckResponse(res); err != nil { 3502 return nil, gensupport.WrapError(err) 3503 } 3504 ret := &Policy{ 3505 ServerResponse: googleapi.ServerResponse{ 3506 Header: res.Header, 3507 HTTPStatusCode: res.StatusCode, 3508 }, 3509 } 3510 target := &ret 3511 if err := gensupport.DecodeResponse(target, res); err != nil { 3512 return nil, err 3513 } 3514 return ret, nil 3515 } 3516 3517 type ProjectsLocationsGlobalConnectivityTestsListCall struct { 3518 s *Service 3519 parent string 3520 urlParams_ gensupport.URLParams 3521 ifNoneMatch_ string 3522 ctx_ context.Context 3523 header_ http.Header 3524 } 3525 3526 // List: Lists all Connectivity Tests owned by a project. 3527 // 3528 // - parent: The parent resource of the Connectivity Tests: 3529 // `projects/{project_id}/locations/global`. 3530 func (r *ProjectsLocationsGlobalConnectivityTestsService) List(parent string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3531 c := &ProjectsLocationsGlobalConnectivityTestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3532 c.parent = parent 3533 return c 3534 } 3535 3536 // Filter sets the optional parameter "filter": Lists the `ConnectivityTests` 3537 // that match the filter expression. A filter expression filters the resources 3538 // listed in the response. The expression must be of the form ` ` where 3539 // operators: `<`, `>`, `<=`, `>=`, `!=`, `=`, `:` are supported (colon `:` 3540 // represents a HAS operator which is roughly synonymous with equality). can 3541 // refer to a proto or JSON field, or a synthetic field. Field names can be 3542 // camelCase or snake_case. Examples: - Filter by name: name = 3543 // "projects/proj-1/locations/global/connectivityTests/test-1 - Filter by 3544 // labels: - Resources that have a key called `foo` labels.foo:* - Resources 3545 // that have a key called `foo` whose value is `bar` labels.foo = bar 3546 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Filter(filter string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3547 c.urlParams_.Set("filter", filter) 3548 return c 3549 } 3550 3551 // OrderBy sets the optional parameter "orderBy": Field to use to sort the 3552 // list. 3553 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3554 c.urlParams_.Set("orderBy", orderBy) 3555 return c 3556 } 3557 3558 // PageSize sets the optional parameter "pageSize": Number of 3559 // `ConnectivityTests` to return. 3560 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalConnectivityTestsListCall { 3561 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3562 return c 3563 } 3564 3565 // PageToken sets the optional parameter "pageToken": Page token from an 3566 // earlier query, as returned in `next_page_token`. 3567 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3568 c.urlParams_.Set("pageToken", pageToken) 3569 return c 3570 } 3571 3572 // Fields allows partial responses to be retrieved. See 3573 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3574 // details. 3575 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsListCall { 3576 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3577 return c 3578 } 3579 3580 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3581 // object's ETag matches the given value. This is useful for getting updates 3582 // only after the object has changed since the last request. 3583 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalConnectivityTestsListCall { 3584 c.ifNoneMatch_ = entityTag 3585 return c 3586 } 3587 3588 // Context sets the context to be used in this call's Do method. 3589 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsListCall { 3590 c.ctx_ = ctx 3591 return c 3592 } 3593 3594 // Header returns a http.Header that can be modified by the caller to add 3595 // headers to the request. 3596 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Header() http.Header { 3597 if c.header_ == nil { 3598 c.header_ = make(http.Header) 3599 } 3600 return c.header_ 3601 } 3602 3603 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) doRequest(alt string) (*http.Response, error) { 3604 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3605 if c.ifNoneMatch_ != "" { 3606 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3607 } 3608 var body io.Reader = nil 3609 c.urlParams_.Set("alt", alt) 3610 c.urlParams_.Set("prettyPrint", "false") 3611 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connectivityTests") 3612 urls += "?" + c.urlParams_.Encode() 3613 req, err := http.NewRequest("GET", urls, body) 3614 if err != nil { 3615 return nil, err 3616 } 3617 req.Header = reqHeaders 3618 googleapi.Expand(req.URL, map[string]string{ 3619 "parent": c.parent, 3620 }) 3621 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3622 } 3623 3624 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.list" call. 3625 // Any non-2xx status code is an error. Response headers are in either 3626 // *ListConnectivityTestsResponse.ServerResponse.Header or (if a response was 3627 // returned at all) in error.(*googleapi.Error).Header. Use 3628 // googleapi.IsNotModified to check whether the returned error was because 3629 // http.StatusNotModified was returned. 3630 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Do(opts ...googleapi.CallOption) (*ListConnectivityTestsResponse, error) { 3631 gensupport.SetOptions(c.urlParams_, opts...) 3632 res, err := c.doRequest("json") 3633 if res != nil && res.StatusCode == http.StatusNotModified { 3634 if res.Body != nil { 3635 res.Body.Close() 3636 } 3637 return nil, gensupport.WrapError(&googleapi.Error{ 3638 Code: res.StatusCode, 3639 Header: res.Header, 3640 }) 3641 } 3642 if err != nil { 3643 return nil, err 3644 } 3645 defer googleapi.CloseBody(res) 3646 if err := googleapi.CheckResponse(res); err != nil { 3647 return nil, gensupport.WrapError(err) 3648 } 3649 ret := &ListConnectivityTestsResponse{ 3650 ServerResponse: googleapi.ServerResponse{ 3651 Header: res.Header, 3652 HTTPStatusCode: res.StatusCode, 3653 }, 3654 } 3655 target := &ret 3656 if err := gensupport.DecodeResponse(target, res); err != nil { 3657 return nil, err 3658 } 3659 return ret, nil 3660 } 3661 3662 // Pages invokes f for each page of results. 3663 // A non-nil error returned from f will halt the iteration. 3664 // The provided context supersedes any context provided to the Context method. 3665 func (c *ProjectsLocationsGlobalConnectivityTestsListCall) Pages(ctx context.Context, f func(*ListConnectivityTestsResponse) error) error { 3666 c.ctx_ = ctx 3667 defer c.PageToken(c.urlParams_.Get("pageToken")) 3668 for { 3669 x, err := c.Do() 3670 if err != nil { 3671 return err 3672 } 3673 if err := f(x); err != nil { 3674 return err 3675 } 3676 if x.NextPageToken == "" { 3677 return nil 3678 } 3679 c.PageToken(x.NextPageToken) 3680 } 3681 } 3682 3683 type ProjectsLocationsGlobalConnectivityTestsPatchCall struct { 3684 s *Service 3685 name string 3686 connectivitytest *ConnectivityTest 3687 urlParams_ gensupport.URLParams 3688 ctx_ context.Context 3689 header_ http.Header 3690 } 3691 3692 // Patch: Updates the configuration of an existing `ConnectivityTest`. After 3693 // you update a test, the reachability analysis is performed as part of the 3694 // long running operation, which completes when the analysis completes. The 3695 // Reachability state in the test resource is updated with the new result. If 3696 // the endpoint specifications in `ConnectivityTest` are invalid (for example, 3697 // they contain non-existent resources in the network, or the user does not 3698 // have read permissions to the network configurations of listed projects), 3699 // then the reachability result returns a value of UNKNOWN. If the endpoint 3700 // specifications in `ConnectivityTest` are incomplete, the reachability result 3701 // returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` 3702 // for more details. 3703 // 3704 // - name: Identifier. Unique name of the resource using the form: 3705 // `projects/{project_id}/locations/global/connectivityTests/{test_id}`. 3706 func (r *ProjectsLocationsGlobalConnectivityTestsService) Patch(name string, connectivitytest *ConnectivityTest) *ProjectsLocationsGlobalConnectivityTestsPatchCall { 3707 c := &ProjectsLocationsGlobalConnectivityTestsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3708 c.name = name 3709 c.connectivitytest = connectivitytest 3710 return c 3711 } 3712 3713 // UpdateMask sets the optional parameter "updateMask": Required. Mask of 3714 // fields to update. At least one path must be supplied in this field. 3715 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalConnectivityTestsPatchCall { 3716 c.urlParams_.Set("updateMask", updateMask) 3717 return c 3718 } 3719 3720 // Fields allows partial responses to be retrieved. See 3721 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3722 // details. 3723 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsPatchCall { 3724 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3725 return c 3726 } 3727 3728 // Context sets the context to be used in this call's Do method. 3729 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsPatchCall { 3730 c.ctx_ = ctx 3731 return c 3732 } 3733 3734 // Header returns a http.Header that can be modified by the caller to add 3735 // headers to the request. 3736 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Header() http.Header { 3737 if c.header_ == nil { 3738 c.header_ = make(http.Header) 3739 } 3740 return c.header_ 3741 } 3742 3743 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) doRequest(alt string) (*http.Response, error) { 3744 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3745 var body io.Reader = nil 3746 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectivitytest) 3747 if err != nil { 3748 return nil, err 3749 } 3750 c.urlParams_.Set("alt", alt) 3751 c.urlParams_.Set("prettyPrint", "false") 3752 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3753 urls += "?" + c.urlParams_.Encode() 3754 req, err := http.NewRequest("PATCH", urls, body) 3755 if err != nil { 3756 return nil, err 3757 } 3758 req.Header = reqHeaders 3759 googleapi.Expand(req.URL, map[string]string{ 3760 "name": c.name, 3761 }) 3762 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3763 } 3764 3765 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.patch" call. 3766 // Any non-2xx status code is an error. Response headers are in either 3767 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3768 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3769 // whether the returned error was because http.StatusNotModified was returned. 3770 func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3771 gensupport.SetOptions(c.urlParams_, opts...) 3772 res, err := c.doRequest("json") 3773 if res != nil && res.StatusCode == http.StatusNotModified { 3774 if res.Body != nil { 3775 res.Body.Close() 3776 } 3777 return nil, gensupport.WrapError(&googleapi.Error{ 3778 Code: res.StatusCode, 3779 Header: res.Header, 3780 }) 3781 } 3782 if err != nil { 3783 return nil, err 3784 } 3785 defer googleapi.CloseBody(res) 3786 if err := googleapi.CheckResponse(res); err != nil { 3787 return nil, gensupport.WrapError(err) 3788 } 3789 ret := &Operation{ 3790 ServerResponse: googleapi.ServerResponse{ 3791 Header: res.Header, 3792 HTTPStatusCode: res.StatusCode, 3793 }, 3794 } 3795 target := &ret 3796 if err := gensupport.DecodeResponse(target, res); err != nil { 3797 return nil, err 3798 } 3799 return ret, nil 3800 } 3801 3802 type ProjectsLocationsGlobalConnectivityTestsRerunCall struct { 3803 s *Service 3804 name string 3805 rerunconnectivitytestrequest *RerunConnectivityTestRequest 3806 urlParams_ gensupport.URLParams 3807 ctx_ context.Context 3808 header_ http.Header 3809 } 3810 3811 // Rerun: Rerun an existing `ConnectivityTest`. After the user triggers the 3812 // rerun, the reachability analysis is performed as part of the long running 3813 // operation, which completes when the analysis completes. Even though the test 3814 // configuration remains the same, the reachability result may change due to 3815 // underlying network configuration changes. If the endpoint specifications in 3816 // `ConnectivityTest` become invalid (for example, specified resources are 3817 // deleted in the network, or you lost read permissions to the network 3818 // configurations of listed projects), then the reachability result returns a 3819 // value of `UNKNOWN`. 3820 // 3821 // - name: Connectivity Test resource name using the form: 3822 // `projects/{project_id}/locations/global/connectivityTests/{test_id}`. 3823 func (r *ProjectsLocationsGlobalConnectivityTestsService) Rerun(name string, rerunconnectivitytestrequest *RerunConnectivityTestRequest) *ProjectsLocationsGlobalConnectivityTestsRerunCall { 3824 c := &ProjectsLocationsGlobalConnectivityTestsRerunCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3825 c.name = name 3826 c.rerunconnectivitytestrequest = rerunconnectivitytestrequest 3827 return c 3828 } 3829 3830 // Fields allows partial responses to be retrieved. See 3831 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3832 // details. 3833 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsRerunCall { 3834 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3835 return c 3836 } 3837 3838 // Context sets the context to be used in this call's Do method. 3839 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsRerunCall { 3840 c.ctx_ = ctx 3841 return c 3842 } 3843 3844 // Header returns a http.Header that can be modified by the caller to add 3845 // headers to the request. 3846 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) Header() http.Header { 3847 if c.header_ == nil { 3848 c.header_ = make(http.Header) 3849 } 3850 return c.header_ 3851 } 3852 3853 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) doRequest(alt string) (*http.Response, error) { 3854 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3855 var body io.Reader = nil 3856 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rerunconnectivitytestrequest) 3857 if err != nil { 3858 return nil, err 3859 } 3860 c.urlParams_.Set("alt", alt) 3861 c.urlParams_.Set("prettyPrint", "false") 3862 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rerun") 3863 urls += "?" + c.urlParams_.Encode() 3864 req, err := http.NewRequest("POST", urls, body) 3865 if err != nil { 3866 return nil, err 3867 } 3868 req.Header = reqHeaders 3869 googleapi.Expand(req.URL, map[string]string{ 3870 "name": c.name, 3871 }) 3872 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3873 } 3874 3875 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.rerun" call. 3876 // Any non-2xx status code is an error. Response headers are in either 3877 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3878 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3879 // whether the returned error was because http.StatusNotModified was returned. 3880 func (c *ProjectsLocationsGlobalConnectivityTestsRerunCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3881 gensupport.SetOptions(c.urlParams_, opts...) 3882 res, err := c.doRequest("json") 3883 if res != nil && res.StatusCode == http.StatusNotModified { 3884 if res.Body != nil { 3885 res.Body.Close() 3886 } 3887 return nil, gensupport.WrapError(&googleapi.Error{ 3888 Code: res.StatusCode, 3889 Header: res.Header, 3890 }) 3891 } 3892 if err != nil { 3893 return nil, err 3894 } 3895 defer googleapi.CloseBody(res) 3896 if err := googleapi.CheckResponse(res); err != nil { 3897 return nil, gensupport.WrapError(err) 3898 } 3899 ret := &Operation{ 3900 ServerResponse: googleapi.ServerResponse{ 3901 Header: res.Header, 3902 HTTPStatusCode: res.StatusCode, 3903 }, 3904 } 3905 target := &ret 3906 if err := gensupport.DecodeResponse(target, res); err != nil { 3907 return nil, err 3908 } 3909 return ret, nil 3910 } 3911 3912 type ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall struct { 3913 s *Service 3914 resource string 3915 setiampolicyrequest *SetIamPolicyRequest 3916 urlParams_ gensupport.URLParams 3917 ctx_ context.Context 3918 header_ http.Header 3919 } 3920 3921 // SetIamPolicy: Sets the access control policy on the specified resource. 3922 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, 3923 // and `PERMISSION_DENIED` errors. 3924 // 3925 // - resource: REQUIRED: The resource for which the policy is being specified. 3926 // See Resource names (https://cloud.google.com/apis/design/resource_names) 3927 // for the appropriate value for this field. 3928 func (r *ProjectsLocationsGlobalConnectivityTestsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall { 3929 c := &ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3930 c.resource = resource 3931 c.setiampolicyrequest = setiampolicyrequest 3932 return c 3933 } 3934 3935 // Fields allows partial responses to be retrieved. See 3936 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3937 // details. 3938 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall { 3939 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3940 return c 3941 } 3942 3943 // Context sets the context to be used in this call's Do method. 3944 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall { 3945 c.ctx_ = ctx 3946 return c 3947 } 3948 3949 // Header returns a http.Header that can be modified by the caller to add 3950 // headers to the request. 3951 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) Header() http.Header { 3952 if c.header_ == nil { 3953 c.header_ = make(http.Header) 3954 } 3955 return c.header_ 3956 } 3957 3958 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3959 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3960 var body io.Reader = nil 3961 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 3962 if err != nil { 3963 return nil, err 3964 } 3965 c.urlParams_.Set("alt", alt) 3966 c.urlParams_.Set("prettyPrint", "false") 3967 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 3968 urls += "?" + c.urlParams_.Encode() 3969 req, err := http.NewRequest("POST", urls, body) 3970 if err != nil { 3971 return nil, err 3972 } 3973 req.Header = reqHeaders 3974 googleapi.Expand(req.URL, map[string]string{ 3975 "resource": c.resource, 3976 }) 3977 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3978 } 3979 3980 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.setIamPolicy" call. 3981 // Any non-2xx status code is an error. Response headers are in either 3982 // *Policy.ServerResponse.Header or (if a response was returned at all) in 3983 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3984 // whether the returned error was because http.StatusNotModified was returned. 3985 func (c *ProjectsLocationsGlobalConnectivityTestsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3986 gensupport.SetOptions(c.urlParams_, opts...) 3987 res, err := c.doRequest("json") 3988 if res != nil && res.StatusCode == http.StatusNotModified { 3989 if res.Body != nil { 3990 res.Body.Close() 3991 } 3992 return nil, gensupport.WrapError(&googleapi.Error{ 3993 Code: res.StatusCode, 3994 Header: res.Header, 3995 }) 3996 } 3997 if err != nil { 3998 return nil, err 3999 } 4000 defer googleapi.CloseBody(res) 4001 if err := googleapi.CheckResponse(res); err != nil { 4002 return nil, gensupport.WrapError(err) 4003 } 4004 ret := &Policy{ 4005 ServerResponse: googleapi.ServerResponse{ 4006 Header: res.Header, 4007 HTTPStatusCode: res.StatusCode, 4008 }, 4009 } 4010 target := &ret 4011 if err := gensupport.DecodeResponse(target, res); err != nil { 4012 return nil, err 4013 } 4014 return ret, nil 4015 } 4016 4017 type ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall struct { 4018 s *Service 4019 resource string 4020 testiampermissionsrequest *TestIamPermissionsRequest 4021 urlParams_ gensupport.URLParams 4022 ctx_ context.Context 4023 header_ http.Header 4024 } 4025 4026 // TestIamPermissions: Returns permissions that a caller has on the specified 4027 // resource. If the resource does not exist, this will return an empty set of 4028 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be 4029 // used for building permission-aware UIs and command-line tools, not for 4030 // authorization checking. This operation may "fail open" without warning. 4031 // 4032 // - resource: REQUIRED: The resource for which the policy detail is being 4033 // requested. See Resource names 4034 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 4035 // value for this field. 4036 func (r *ProjectsLocationsGlobalConnectivityTestsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall { 4037 c := &ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4038 c.resource = resource 4039 c.testiampermissionsrequest = testiampermissionsrequest 4040 return c 4041 } 4042 4043 // Fields allows partial responses to be retrieved. See 4044 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4045 // details. 4046 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall { 4047 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4048 return c 4049 } 4050 4051 // Context sets the context to be used in this call's Do method. 4052 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall { 4053 c.ctx_ = ctx 4054 return c 4055 } 4056 4057 // Header returns a http.Header that can be modified by the caller to add 4058 // headers to the request. 4059 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) Header() http.Header { 4060 if c.header_ == nil { 4061 c.header_ = make(http.Header) 4062 } 4063 return c.header_ 4064 } 4065 4066 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 4067 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4068 var body io.Reader = nil 4069 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 4070 if err != nil { 4071 return nil, err 4072 } 4073 c.urlParams_.Set("alt", alt) 4074 c.urlParams_.Set("prettyPrint", "false") 4075 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 4076 urls += "?" + c.urlParams_.Encode() 4077 req, err := http.NewRequest("POST", urls, body) 4078 if err != nil { 4079 return nil, err 4080 } 4081 req.Header = reqHeaders 4082 googleapi.Expand(req.URL, map[string]string{ 4083 "resource": c.resource, 4084 }) 4085 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4086 } 4087 4088 // Do executes the "networkmanagement.projects.locations.global.connectivityTests.testIamPermissions" call. 4089 // Any non-2xx status code is an error. Response headers are in either 4090 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 4091 // returned at all) in error.(*googleapi.Error).Header. Use 4092 // googleapi.IsNotModified to check whether the returned error was because 4093 // http.StatusNotModified was returned. 4094 func (c *ProjectsLocationsGlobalConnectivityTestsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 4095 gensupport.SetOptions(c.urlParams_, opts...) 4096 res, err := c.doRequest("json") 4097 if res != nil && res.StatusCode == http.StatusNotModified { 4098 if res.Body != nil { 4099 res.Body.Close() 4100 } 4101 return nil, gensupport.WrapError(&googleapi.Error{ 4102 Code: res.StatusCode, 4103 Header: res.Header, 4104 }) 4105 } 4106 if err != nil { 4107 return nil, err 4108 } 4109 defer googleapi.CloseBody(res) 4110 if err := googleapi.CheckResponse(res); err != nil { 4111 return nil, gensupport.WrapError(err) 4112 } 4113 ret := &TestIamPermissionsResponse{ 4114 ServerResponse: googleapi.ServerResponse{ 4115 Header: res.Header, 4116 HTTPStatusCode: res.StatusCode, 4117 }, 4118 } 4119 target := &ret 4120 if err := gensupport.DecodeResponse(target, res); err != nil { 4121 return nil, err 4122 } 4123 return ret, nil 4124 } 4125 4126 type ProjectsLocationsGlobalOperationsCancelCall struct { 4127 s *Service 4128 name string 4129 canceloperationrequest *CancelOperationRequest 4130 urlParams_ gensupport.URLParams 4131 ctx_ context.Context 4132 header_ http.Header 4133 } 4134 4135 // Cancel: Starts asynchronous cancellation on a long-running operation. The 4136 // server makes a best effort to cancel the operation, but success is not 4137 // guaranteed. If the server doesn't support this method, it returns 4138 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or 4139 // other methods to check whether the cancellation succeeded or whether the 4140 // operation completed despite cancellation. On successful cancellation, the 4141 // operation is not deleted; instead, it becomes an operation with an 4142 // Operation.error value with a google.rpc.Status.code of 1, corresponding to 4143 // `Code.CANCELLED`. 4144 // 4145 // - name: The name of the operation resource to be cancelled. 4146 func (r *ProjectsLocationsGlobalOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsGlobalOperationsCancelCall { 4147 c := &ProjectsLocationsGlobalOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4148 c.name = name 4149 c.canceloperationrequest = canceloperationrequest 4150 return c 4151 } 4152 4153 // Fields allows partial responses to be retrieved. See 4154 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4155 // details. 4156 func (c *ProjectsLocationsGlobalOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsCancelCall { 4157 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4158 return c 4159 } 4160 4161 // Context sets the context to be used in this call's Do method. 4162 func (c *ProjectsLocationsGlobalOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsCancelCall { 4163 c.ctx_ = ctx 4164 return c 4165 } 4166 4167 // Header returns a http.Header that can be modified by the caller to add 4168 // headers to the request. 4169 func (c *ProjectsLocationsGlobalOperationsCancelCall) Header() http.Header { 4170 if c.header_ == nil { 4171 c.header_ = make(http.Header) 4172 } 4173 return c.header_ 4174 } 4175 4176 func (c *ProjectsLocationsGlobalOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 4177 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4178 var body io.Reader = nil 4179 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 4180 if err != nil { 4181 return nil, err 4182 } 4183 c.urlParams_.Set("alt", alt) 4184 c.urlParams_.Set("prettyPrint", "false") 4185 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") 4186 urls += "?" + c.urlParams_.Encode() 4187 req, err := http.NewRequest("POST", urls, body) 4188 if err != nil { 4189 return nil, err 4190 } 4191 req.Header = reqHeaders 4192 googleapi.Expand(req.URL, map[string]string{ 4193 "name": c.name, 4194 }) 4195 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4196 } 4197 4198 // Do executes the "networkmanagement.projects.locations.global.operations.cancel" call. 4199 // Any non-2xx status code is an error. Response headers are in either 4200 // *Empty.ServerResponse.Header or (if a response was returned at all) in 4201 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4202 // whether the returned error was because http.StatusNotModified was returned. 4203 func (c *ProjectsLocationsGlobalOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4204 gensupport.SetOptions(c.urlParams_, opts...) 4205 res, err := c.doRequest("json") 4206 if res != nil && res.StatusCode == http.StatusNotModified { 4207 if res.Body != nil { 4208 res.Body.Close() 4209 } 4210 return nil, gensupport.WrapError(&googleapi.Error{ 4211 Code: res.StatusCode, 4212 Header: res.Header, 4213 }) 4214 } 4215 if err != nil { 4216 return nil, err 4217 } 4218 defer googleapi.CloseBody(res) 4219 if err := googleapi.CheckResponse(res); err != nil { 4220 return nil, gensupport.WrapError(err) 4221 } 4222 ret := &Empty{ 4223 ServerResponse: googleapi.ServerResponse{ 4224 Header: res.Header, 4225 HTTPStatusCode: res.StatusCode, 4226 }, 4227 } 4228 target := &ret 4229 if err := gensupport.DecodeResponse(target, res); err != nil { 4230 return nil, err 4231 } 4232 return ret, nil 4233 } 4234 4235 type ProjectsLocationsGlobalOperationsDeleteCall struct { 4236 s *Service 4237 name string 4238 urlParams_ gensupport.URLParams 4239 ctx_ context.Context 4240 header_ http.Header 4241 } 4242 4243 // Delete: Deletes a long-running operation. This method indicates that the 4244 // client is no longer interested in the operation result. It does not cancel 4245 // the operation. If the server doesn't support this method, it returns 4246 // `google.rpc.Code.UNIMPLEMENTED`. 4247 // 4248 // - name: The name of the operation resource to be deleted. 4249 func (r *ProjectsLocationsGlobalOperationsService) Delete(name string) *ProjectsLocationsGlobalOperationsDeleteCall { 4250 c := &ProjectsLocationsGlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4251 c.name = name 4252 return c 4253 } 4254 4255 // Fields allows partial responses to be retrieved. See 4256 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4257 // details. 4258 func (c *ProjectsLocationsGlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsDeleteCall { 4259 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4260 return c 4261 } 4262 4263 // Context sets the context to be used in this call's Do method. 4264 func (c *ProjectsLocationsGlobalOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsDeleteCall { 4265 c.ctx_ = ctx 4266 return c 4267 } 4268 4269 // Header returns a http.Header that can be modified by the caller to add 4270 // headers to the request. 4271 func (c *ProjectsLocationsGlobalOperationsDeleteCall) Header() http.Header { 4272 if c.header_ == nil { 4273 c.header_ = make(http.Header) 4274 } 4275 return c.header_ 4276 } 4277 4278 func (c *ProjectsLocationsGlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { 4279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4280 var body io.Reader = nil 4281 c.urlParams_.Set("alt", alt) 4282 c.urlParams_.Set("prettyPrint", "false") 4283 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 4284 urls += "?" + c.urlParams_.Encode() 4285 req, err := http.NewRequest("DELETE", urls, body) 4286 if err != nil { 4287 return nil, err 4288 } 4289 req.Header = reqHeaders 4290 googleapi.Expand(req.URL, map[string]string{ 4291 "name": c.name, 4292 }) 4293 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4294 } 4295 4296 // Do executes the "networkmanagement.projects.locations.global.operations.delete" call. 4297 // Any non-2xx status code is an error. Response headers are in either 4298 // *Empty.ServerResponse.Header or (if a response was returned at all) in 4299 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4300 // whether the returned error was because http.StatusNotModified was returned. 4301 func (c *ProjectsLocationsGlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4302 gensupport.SetOptions(c.urlParams_, opts...) 4303 res, err := c.doRequest("json") 4304 if res != nil && res.StatusCode == http.StatusNotModified { 4305 if res.Body != nil { 4306 res.Body.Close() 4307 } 4308 return nil, gensupport.WrapError(&googleapi.Error{ 4309 Code: res.StatusCode, 4310 Header: res.Header, 4311 }) 4312 } 4313 if err != nil { 4314 return nil, err 4315 } 4316 defer googleapi.CloseBody(res) 4317 if err := googleapi.CheckResponse(res); err != nil { 4318 return nil, gensupport.WrapError(err) 4319 } 4320 ret := &Empty{ 4321 ServerResponse: googleapi.ServerResponse{ 4322 Header: res.Header, 4323 HTTPStatusCode: res.StatusCode, 4324 }, 4325 } 4326 target := &ret 4327 if err := gensupport.DecodeResponse(target, res); err != nil { 4328 return nil, err 4329 } 4330 return ret, nil 4331 } 4332 4333 type ProjectsLocationsGlobalOperationsGetCall struct { 4334 s *Service 4335 name string 4336 urlParams_ gensupport.URLParams 4337 ifNoneMatch_ string 4338 ctx_ context.Context 4339 header_ http.Header 4340 } 4341 4342 // Get: Gets the latest state of a long-running operation. Clients can use this 4343 // method to poll the operation result at intervals as recommended by the API 4344 // service. 4345 // 4346 // - name: The name of the operation resource. 4347 func (r *ProjectsLocationsGlobalOperationsService) Get(name string) *ProjectsLocationsGlobalOperationsGetCall { 4348 c := &ProjectsLocationsGlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4349 c.name = name 4350 return c 4351 } 4352 4353 // Fields allows partial responses to be retrieved. See 4354 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4355 // details. 4356 func (c *ProjectsLocationsGlobalOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsGetCall { 4357 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4358 return c 4359 } 4360 4361 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4362 // object's ETag matches the given value. This is useful for getting updates 4363 // only after the object has changed since the last request. 4364 func (c *ProjectsLocationsGlobalOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalOperationsGetCall { 4365 c.ifNoneMatch_ = entityTag 4366 return c 4367 } 4368 4369 // Context sets the context to be used in this call's Do method. 4370 func (c *ProjectsLocationsGlobalOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsGetCall { 4371 c.ctx_ = ctx 4372 return c 4373 } 4374 4375 // Header returns a http.Header that can be modified by the caller to add 4376 // headers to the request. 4377 func (c *ProjectsLocationsGlobalOperationsGetCall) Header() http.Header { 4378 if c.header_ == nil { 4379 c.header_ = make(http.Header) 4380 } 4381 return c.header_ 4382 } 4383 4384 func (c *ProjectsLocationsGlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { 4385 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4386 if c.ifNoneMatch_ != "" { 4387 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4388 } 4389 var body io.Reader = nil 4390 c.urlParams_.Set("alt", alt) 4391 c.urlParams_.Set("prettyPrint", "false") 4392 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 4393 urls += "?" + c.urlParams_.Encode() 4394 req, err := http.NewRequest("GET", urls, body) 4395 if err != nil { 4396 return nil, err 4397 } 4398 req.Header = reqHeaders 4399 googleapi.Expand(req.URL, map[string]string{ 4400 "name": c.name, 4401 }) 4402 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4403 } 4404 4405 // Do executes the "networkmanagement.projects.locations.global.operations.get" call. 4406 // Any non-2xx status code is an error. Response headers are in either 4407 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4408 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4409 // whether the returned error was because http.StatusNotModified was returned. 4410 func (c *ProjectsLocationsGlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4411 gensupport.SetOptions(c.urlParams_, opts...) 4412 res, err := c.doRequest("json") 4413 if res != nil && res.StatusCode == http.StatusNotModified { 4414 if res.Body != nil { 4415 res.Body.Close() 4416 } 4417 return nil, gensupport.WrapError(&googleapi.Error{ 4418 Code: res.StatusCode, 4419 Header: res.Header, 4420 }) 4421 } 4422 if err != nil { 4423 return nil, err 4424 } 4425 defer googleapi.CloseBody(res) 4426 if err := googleapi.CheckResponse(res); err != nil { 4427 return nil, gensupport.WrapError(err) 4428 } 4429 ret := &Operation{ 4430 ServerResponse: googleapi.ServerResponse{ 4431 Header: res.Header, 4432 HTTPStatusCode: res.StatusCode, 4433 }, 4434 } 4435 target := &ret 4436 if err := gensupport.DecodeResponse(target, res); err != nil { 4437 return nil, err 4438 } 4439 return ret, nil 4440 } 4441 4442 type ProjectsLocationsGlobalOperationsListCall struct { 4443 s *Service 4444 name string 4445 urlParams_ gensupport.URLParams 4446 ifNoneMatch_ string 4447 ctx_ context.Context 4448 header_ http.Header 4449 } 4450 4451 // List: Lists operations that match the specified filter in the request. If 4452 // the server doesn't support this method, it returns `UNIMPLEMENTED`. 4453 // 4454 // - name: The name of the operation's parent resource. 4455 func (r *ProjectsLocationsGlobalOperationsService) List(name string) *ProjectsLocationsGlobalOperationsListCall { 4456 c := &ProjectsLocationsGlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4457 c.name = name 4458 return c 4459 } 4460 4461 // Filter sets the optional parameter "filter": The standard list filter. 4462 func (c *ProjectsLocationsGlobalOperationsListCall) Filter(filter string) *ProjectsLocationsGlobalOperationsListCall { 4463 c.urlParams_.Set("filter", filter) 4464 return c 4465 } 4466 4467 // PageSize sets the optional parameter "pageSize": The standard list page 4468 // size. 4469 func (c *ProjectsLocationsGlobalOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalOperationsListCall { 4470 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4471 return c 4472 } 4473 4474 // PageToken sets the optional parameter "pageToken": The standard list page 4475 // token. 4476 func (c *ProjectsLocationsGlobalOperationsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalOperationsListCall { 4477 c.urlParams_.Set("pageToken", pageToken) 4478 return c 4479 } 4480 4481 // Fields allows partial responses to be retrieved. See 4482 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4483 // details. 4484 func (c *ProjectsLocationsGlobalOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsListCall { 4485 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4486 return c 4487 } 4488 4489 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4490 // object's ETag matches the given value. This is useful for getting updates 4491 // only after the object has changed since the last request. 4492 func (c *ProjectsLocationsGlobalOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalOperationsListCall { 4493 c.ifNoneMatch_ = entityTag 4494 return c 4495 } 4496 4497 // Context sets the context to be used in this call's Do method. 4498 func (c *ProjectsLocationsGlobalOperationsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsListCall { 4499 c.ctx_ = ctx 4500 return c 4501 } 4502 4503 // Header returns a http.Header that can be modified by the caller to add 4504 // headers to the request. 4505 func (c *ProjectsLocationsGlobalOperationsListCall) Header() http.Header { 4506 if c.header_ == nil { 4507 c.header_ = make(http.Header) 4508 } 4509 return c.header_ 4510 } 4511 4512 func (c *ProjectsLocationsGlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { 4513 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4514 if c.ifNoneMatch_ != "" { 4515 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4516 } 4517 var body io.Reader = nil 4518 c.urlParams_.Set("alt", alt) 4519 c.urlParams_.Set("prettyPrint", "false") 4520 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 4521 urls += "?" + c.urlParams_.Encode() 4522 req, err := http.NewRequest("GET", urls, body) 4523 if err != nil { 4524 return nil, err 4525 } 4526 req.Header = reqHeaders 4527 googleapi.Expand(req.URL, map[string]string{ 4528 "name": c.name, 4529 }) 4530 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4531 } 4532 4533 // Do executes the "networkmanagement.projects.locations.global.operations.list" call. 4534 // Any non-2xx status code is an error. Response headers are in either 4535 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned 4536 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4537 // check whether the returned error was because http.StatusNotModified was 4538 // returned. 4539 func (c *ProjectsLocationsGlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 4540 gensupport.SetOptions(c.urlParams_, opts...) 4541 res, err := c.doRequest("json") 4542 if res != nil && res.StatusCode == http.StatusNotModified { 4543 if res.Body != nil { 4544 res.Body.Close() 4545 } 4546 return nil, gensupport.WrapError(&googleapi.Error{ 4547 Code: res.StatusCode, 4548 Header: res.Header, 4549 }) 4550 } 4551 if err != nil { 4552 return nil, err 4553 } 4554 defer googleapi.CloseBody(res) 4555 if err := googleapi.CheckResponse(res); err != nil { 4556 return nil, gensupport.WrapError(err) 4557 } 4558 ret := &ListOperationsResponse{ 4559 ServerResponse: googleapi.ServerResponse{ 4560 Header: res.Header, 4561 HTTPStatusCode: res.StatusCode, 4562 }, 4563 } 4564 target := &ret 4565 if err := gensupport.DecodeResponse(target, res); err != nil { 4566 return nil, err 4567 } 4568 return ret, nil 4569 } 4570 4571 // Pages invokes f for each page of results. 4572 // A non-nil error returned from f will halt the iteration. 4573 // The provided context supersedes any context provided to the Context method. 4574 func (c *ProjectsLocationsGlobalOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 4575 c.ctx_ = ctx 4576 defer c.PageToken(c.urlParams_.Get("pageToken")) 4577 for { 4578 x, err := c.Do() 4579 if err != nil { 4580 return err 4581 } 4582 if err := f(x); err != nil { 4583 return err 4584 } 4585 if x.NextPageToken == "" { 4586 return nil 4587 } 4588 c.PageToken(x.NextPageToken) 4589 } 4590 } 4591