diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index bbe844f5f72..7fce374cb98 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -561,7 +561,7 @@ } } }, - "revision": "20240202", + "revision": "20240206", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1358,7 +1358,7 @@ "type": "array" }, "uid": { - "description": "Output only. A system generated unique ID (in UUID4 format) for the Job.", + "description": "Output only. A system generated unique ID for the Job.", "readOnly": true, "type": "string" }, diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index 7dedb0c47fc..1535492b677 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -1548,8 +1548,7 @@ type Job struct { // supported now. TaskGroups []*TaskGroup `json:"taskGroups,omitempty"` - // Uid: Output only. A system generated unique ID (in UUID4 format) for - // the Job. + // Uid: Output only. A system generated unique ID for the Job. Uid string `json:"uid,omitempty"` // UpdateTime: Output only. The last time the Job was updated. diff --git a/beyondcorp/v1/beyondcorp-api.json b/beyondcorp/v1/beyondcorp-api.json index c6683db7d18..f9b803d983f 100644 --- a/beyondcorp/v1/beyondcorp-api.json +++ b/beyondcorp/v1/beyondcorp-api.json @@ -1804,7 +1804,7 @@ } } }, - "revision": "20240103", + "revision": "20240207", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -3131,7 +3131,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go index f31147f43a3..367f21f819c 100644 --- a/beyondcorp/v1/beyondcorp-gen.go +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -2267,7 +2267,11 @@ type GoogleIamV1Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index 62eb4812a11..557d366aab9 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -3716,7 +3716,7 @@ } } }, - "revision": "20240103", + "revision": "20240207", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -5931,7 +5931,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index 1c13493cb74..f022b04a439 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -3685,7 +3685,11 @@ type GoogleIamV1Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index b9af895c932..9e98dd68486 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -2354,7 +2354,7 @@ } } }, - "revision": "20240122", + "revision": "20240207", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -3441,6 +3441,21 @@ "description": "Optional. Location of the custom connector spec.", "type": "string" }, + "state": { + "description": "Output only. State of the custom connector version.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DEPRECATED" + ], + "enumDescriptions": [ + "State Unspecified.", + "Active state. By default we set the state to Active.", + "Deprecated state." + ], + "readOnly": true, + "type": "string" + }, "updateTime": { "description": "Output only. Updated time.", "format": "google-datetime", @@ -3651,9 +3666,9 @@ "CMEK" ], "enumDescriptions": [ - "Egress mode unspecified.", - "Network egress through auto assigned IPs.", - "Network egress through static IPs." + "Encryption type unspecified.", + "Google managed encryption keys", + "Customer managed encryption keys." ], "type": "string" }, diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 8d464a3ec75..098deee99a0 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -1585,6 +1585,14 @@ type CustomConnectorVersion struct { // SpecLocation: Optional. Location of the custom connector spec. SpecLocation string `json:"specLocation,omitempty"` + // State: Output only. State of the custom connector version. + // + // Possible values: + // "STATE_UNSPECIFIED" - State Unspecified. + // "ACTIVE" - Active state. By default we set the state to Active. + // "DEPRECATED" - Deprecated state. + State string `json:"state,omitempty"` + // UpdateTime: Output only. Updated time. UpdateTime string `json:"updateTime,omitempty"` @@ -1951,9 +1959,9 @@ type EncryptionConfig struct { // EncryptionType: Optional. Encryption type for the region. // // Possible values: - // "ENCRYPTION_TYPE_UNSPECIFIED" - Egress mode unspecified. - // "GMEK" - Network egress through auto assigned IPs. - // "CMEK" - Network egress through static IPs. + // "ENCRYPTION_TYPE_UNSPECIFIED" - Encryption type unspecified. + // "GMEK" - Google managed encryption keys + // "CMEK" - Customer managed encryption keys. EncryptionType string `json:"encryptionType,omitempty"` // KmsKeyName: Optional. KMS crypto key. This field accepts identifiers diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index 5c0f0ea030d..fcc8f1cb71c 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1250,7 +1250,7 @@ } } }, - "revision": "20240117", + "revision": "20240215", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AvroFileFormat": { @@ -1274,6 +1274,10 @@ "postgresqlExcludedObjects": { "$ref": "PostgresqlRdbms", "description": "PostgreSQL data source objects to avoid backfilling." + }, + "sqlServerExcludedObjects": { + "$ref": "SqlServerRdbms", + "description": "SQLServer data source objects to avoid backfilling" } }, "type": "object" @@ -1455,6 +1459,10 @@ "$ref": "PrivateConnectivity", "description": "Private connectivity." }, + "sqlServerProfile": { + "$ref": "SqlServerProfile", + "description": "SQLServer Connection Profile configuration." + }, "staticServiceIpConnectivity": { "$ref": "StaticServiceIpConnectivity", "description": "Static Service IP connectivity." @@ -2776,6 +2784,10 @@ "sourceConnectionProfile": { "description": "Required. Source connection profile resoource. Format: `projects/{project}/locations/{location}/connectionProfiles/{name}`", "type": "string" + }, + "sqlServerSourceConfig": { + "$ref": "SqlServerSourceConfig", + "description": "SQLServer data source configuration." } }, "type": "object" @@ -2806,6 +2818,10 @@ "postgresqlIdentifier": { "$ref": "PostgresqlObjectIdentifier", "description": "PostgreSQL data source object identifier." + }, + "sqlServerIdentifier": { + "$ref": "SqlServerObjectIdentifier", + "description": "SQLServer data source object identifier." } }, "type": "object" @@ -2825,6 +2841,167 @@ }, "type": "object" }, + "SqlServerColumn": { + "description": "SQLServer Column.", + "id": "SqlServerColumn", + "properties": { + "column": { + "description": "Column name.", + "type": "string" + }, + "dataType": { + "description": "The SQLServer data type.", + "type": "string" + }, + "length": { + "description": "Column length.", + "format": "int32", + "type": "integer" + }, + "nullable": { + "description": "Whether or not the column can accept a null value.", + "type": "boolean" + }, + "ordinalPosition": { + "description": "The ordinal position of the column in the table.", + "format": "int32", + "type": "integer" + }, + "precision": { + "description": "Column precision.", + "format": "int32", + "type": "integer" + }, + "primaryKey": { + "description": "Whether or not the column represents a primary key.", + "type": "boolean" + }, + "scale": { + "description": "Column scale.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "SqlServerObjectIdentifier": { + "description": "SQLServer data source object identifier.", + "id": "SqlServerObjectIdentifier", + "properties": { + "schema": { + "description": "Required. The schema name.", + "type": "string" + }, + "table": { + "description": "Required. The table name.", + "type": "string" + } + }, + "type": "object" + }, + "SqlServerProfile": { + "description": "SQLServer database profile", + "id": "SqlServerProfile", + "properties": { + "database": { + "description": "Required. Database for the SQLServer connection.", + "type": "string" + }, + "hostname": { + "description": "Required. Hostname for the SQLServer connection.", + "type": "string" + }, + "password": { + "description": "Required. Password for the SQLServer connection.", + "type": "string" + }, + "port": { + "description": "Port for the SQLServer connection, default value is 1433.", + "format": "int32", + "type": "integer" + }, + "username": { + "description": "Required. Username for the SQLServer connection.", + "type": "string" + } + }, + "type": "object" + }, + "SqlServerRdbms": { + "description": "SQLServer database structure.", + "id": "SqlServerRdbms", + "properties": { + "schemas": { + "description": "SQLServer schemas in the database server.", + "items": { + "$ref": "SqlServerSchema" + }, + "type": "array" + } + }, + "type": "object" + }, + "SqlServerSchema": { + "description": "SQLServer schema.", + "id": "SqlServerSchema", + "properties": { + "schema": { + "description": "Schema name.", + "type": "string" + }, + "tables": { + "description": "Tables in the schema.", + "items": { + "$ref": "SqlServerTable" + }, + "type": "array" + } + }, + "type": "object" + }, + "SqlServerSourceConfig": { + "description": "SQLServer data source configuration", + "id": "SqlServerSourceConfig", + "properties": { + "excludeObjects": { + "$ref": "SqlServerRdbms", + "description": "SQLServer objects to exclude from the stream." + }, + "includeObjects": { + "$ref": "SqlServerRdbms", + "description": "SQLServer objects to include in the stream." + }, + "maxConcurrentBackfillTasks": { + "description": "Max concurrent backfill tasks.", + "format": "int32", + "type": "integer" + }, + "maxConcurrentCdcTasks": { + "description": "Max concurrent CDC tasks.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "SqlServerTable": { + "description": "SQLServer table.", + "id": "SqlServerTable", + "properties": { + "columns": { + "description": "SQLServer columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything.", + "items": { + "$ref": "SqlServerColumn" + }, + "type": "array" + }, + "table": { + "description": "Table name.", + "type": "string" + } + }, + "type": "object" + }, "StartBackfillJobRequest": { "description": "Request for manually initiating a backfill job for a specific stream object.", "id": "StartBackfillJobRequest", diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index dbdb417c633..9c84fdb7f8c 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -266,6 +266,10 @@ type BackfillAllStrategy struct { // backfilling. PostgresqlExcludedObjects *PostgresqlRdbms `json:"postgresqlExcludedObjects,omitempty"` + // SqlServerExcludedObjects: SQLServer data source objects to avoid + // backfilling + SqlServerExcludedObjects *SqlServerRdbms `json:"sqlServerExcludedObjects,omitempty"` + // ForceSendFields is a list of field names (e.g. // "MysqlExcludedObjects") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -479,6 +483,9 @@ type ConnectionProfile struct { // PrivateConnectivity: Private connectivity. PrivateConnectivity *PrivateConnectivity `json:"privateConnectivity,omitempty"` + // SqlServerProfile: SQLServer Connection Profile configuration. + SqlServerProfile *SqlServerProfile `json:"sqlServerProfile,omitempty"` + // StaticServiceIpConnectivity: Static Service IP connectivity. StaticServiceIpConnectivity *StaticServiceIpConnectivity `json:"staticServiceIpConnectivity,omitempty"` @@ -2581,6 +2588,9 @@ type SourceConfig struct { // `projects/{project}/locations/{location}/connectionProfiles/{name}` SourceConnectionProfile string `json:"sourceConnectionProfile,omitempty"` + // SqlServerSourceConfig: SQLServer data source configuration. + SqlServerSourceConfig *SqlServerSourceConfig `json:"sqlServerSourceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "MysqlSourceConfig") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2649,6 +2659,9 @@ type SourceObjectIdentifier struct { // PostgresqlIdentifier: PostgreSQL data source object identifier. PostgresqlIdentifier *PostgresqlObjectIdentifier `json:"postgresqlIdentifier,omitempty"` + // SqlServerIdentifier: SQLServer data source object identifier. + SqlServerIdentifier *SqlServerObjectIdentifier `json:"sqlServerIdentifier,omitempty"` + // ForceSendFields is a list of field names (e.g. "MysqlIdentifier") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2707,6 +2720,255 @@ func (s *SpecificStartPosition) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SqlServerColumn: SQLServer Column. +type SqlServerColumn struct { + // Column: Column name. + Column string `json:"column,omitempty"` + + // DataType: The SQLServer data type. + DataType string `json:"dataType,omitempty"` + + // Length: Column length. + Length int64 `json:"length,omitempty"` + + // Nullable: Whether or not the column can accept a null value. + Nullable bool `json:"nullable,omitempty"` + + // OrdinalPosition: The ordinal position of the column in the table. + OrdinalPosition int64 `json:"ordinalPosition,omitempty"` + + // Precision: Column precision. + Precision int64 `json:"precision,omitempty"` + + // PrimaryKey: Whether or not the column represents a primary key. + PrimaryKey bool `json:"primaryKey,omitempty"` + + // Scale: Column scale. + Scale int64 `json:"scale,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Column") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Column") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerColumn) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerColumn + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerObjectIdentifier: SQLServer data source object identifier. +type SqlServerObjectIdentifier struct { + // Schema: Required. The schema name. + Schema string `json:"schema,omitempty"` + + // Table: Required. The table name. + Table string `json:"table,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Schema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Schema") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerObjectIdentifier) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerObjectIdentifier + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerProfile: SQLServer database profile +type SqlServerProfile struct { + // Database: Required. Database for the SQLServer connection. + Database string `json:"database,omitempty"` + + // Hostname: Required. Hostname for the SQLServer connection. + Hostname string `json:"hostname,omitempty"` + + // Password: Required. Password for the SQLServer connection. + Password string `json:"password,omitempty"` + + // Port: Port for the SQLServer connection, default value is 1433. + Port int64 `json:"port,omitempty"` + + // Username: Required. Username for the SQLServer connection. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Database") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Database") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerProfile) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerProfile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerRdbms: SQLServer database structure. +type SqlServerRdbms struct { + // Schemas: SQLServer schemas in the database server. + Schemas []*SqlServerSchema `json:"schemas,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Schemas") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Schemas") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerRdbms) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerRdbms + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerSchema: SQLServer schema. +type SqlServerSchema struct { + // Schema: Schema name. + Schema string `json:"schema,omitempty"` + + // Tables: Tables in the schema. + Tables []*SqlServerTable `json:"tables,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Schema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Schema") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerSchema) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerSourceConfig: SQLServer data source configuration +type SqlServerSourceConfig struct { + // ExcludeObjects: SQLServer objects to exclude from the stream. + ExcludeObjects *SqlServerRdbms `json:"excludeObjects,omitempty"` + + // IncludeObjects: SQLServer objects to include in the stream. + IncludeObjects *SqlServerRdbms `json:"includeObjects,omitempty"` + + // MaxConcurrentBackfillTasks: Max concurrent backfill tasks. + MaxConcurrentBackfillTasks int64 `json:"maxConcurrentBackfillTasks,omitempty"` + + // MaxConcurrentCdcTasks: Max concurrent CDC tasks. + MaxConcurrentCdcTasks int64 `json:"maxConcurrentCdcTasks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExcludeObjects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExcludeObjects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerSourceConfig) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerSourceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerTable: SQLServer table. +type SqlServerTable struct { + // Columns: SQLServer columns in the schema. When unspecified as part of + // include/exclude objects, includes/excludes everything. + Columns []*SqlServerColumn `json:"columns,omitempty"` + + // Table: Table name. + Table string `json:"table,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Columns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Columns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerTable) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerTable + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StartBackfillJobRequest: Request for manually initiating a backfill // job for a specific stream object. type StartBackfillJobRequest struct { diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 5a1c12e453e..2273ef8f183 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -1834,7 +1834,7 @@ } } }, - "revision": "20240118", + "revision": "20240209", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -2547,6 +2547,24 @@ ], "type": "string" }, + "state": { + "description": "The state of CS This field summarizes the other fields in this message.", + "enum": [ + "STATE_UNSPECIFIED", + "CONFIG_SYNC_NOT_INSTALLED", + "CONFIG_SYNC_INSTALLED", + "CONFIG_SYNC_ERROR", + "CONFIG_SYNC_PENDING" + ], + "enumDescriptions": [ + "CS's state cannot be determined.", + "CS is not installed.", + "The expected CS version is installed successfully.", + "CS encounters errors.", + "CS is installing or terminating." + ], + "type": "string" + }, "syncState": { "$ref": "ConfigManagementSyncState", "description": "The state of ConfigSync's process to sync configs to a cluster" @@ -2855,6 +2873,20 @@ "$ref": "ConfigManagementHierarchyControllerConfig", "description": "Hierarchy Controller configuration for the cluster." }, + "management": { + "description": "Enables automatic Feature management.", + "enum": [ + "MANAGEMENT_UNSPECIFIED", + "MANAGEMENT_AUTOMATIC", + "MANAGEMENT_MANUAL" + ], + "enumDescriptions": [ + "Unspecified", + "Google will manage the Feature for the cluster.", + "User will manually manage the Feature for the cluster." + ], + "type": "string" + }, "policyController": { "$ref": "ConfigManagementPolicyController", "description": "Policy Controller configuration for the cluster." diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index 483dded1ba8..e0622c4608f 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -1476,6 +1476,18 @@ type ConfigManagementConfigSyncState struct { // "INSTALLING" - CRD is installing RootsyncCrd string `json:"rootsyncCrd,omitempty"` + // State: The state of CS This field summarizes the other fields in this + // message. + // + // Possible values: + // "STATE_UNSPECIFIED" - CS's state cannot be determined. + // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed. + // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed + // successfully. + // "CONFIG_SYNC_ERROR" - CS encounters errors. + // "CONFIG_SYNC_PENDING" - CS is installing or terminating. + State string `json:"state,omitempty"` + // SyncState: The state of ConfigSync's process to sync configs to a // cluster SyncState *ConfigManagementSyncState `json:"syncState,omitempty"` @@ -1952,6 +1964,16 @@ type ConfigManagementMembershipSpec struct { // cluster. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` + // Management: Enables automatic Feature management. + // + // Possible values: + // "MANAGEMENT_UNSPECIFIED" - Unspecified + // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the + // cluster. + // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the + // cluster. + Management string `json:"management,omitempty"` + // PolicyController: Policy Controller configuration for the cluster. PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"` diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index 0c4d192182a..b5ce16e5ffe 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -1685,6 +1685,42 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "listPermitted": { + "description": "Lists permitted Scopes.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes:listPermitted", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.listPermitted", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListPermittedScopes` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/scopes:listPermitted", + "response": { + "$ref": "ListPermittedScopesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "patch": { "description": "Updates a scopes.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}", @@ -2098,7 +2134,7 @@ } } }, - "revision": "20240118", + "revision": "20240209", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -3012,6 +3048,24 @@ ], "type": "string" }, + "state": { + "description": "The state of CS This field summarizes the other fields in this message.", + "enum": [ + "STATE_UNSPECIFIED", + "CONFIG_SYNC_NOT_INSTALLED", + "CONFIG_SYNC_INSTALLED", + "CONFIG_SYNC_ERROR", + "CONFIG_SYNC_PENDING" + ], + "enumDescriptions": [ + "CS's state cannot be determined.", + "CS is not installed.", + "The expected CS version is installed successfully.", + "CS encounters errors.", + "CS is installing or terminating." + ], + "type": "string" + }, "syncState": { "$ref": "ConfigManagementSyncState", "description": "The state of ConfigSync's process to sync configs to a cluster" @@ -3325,6 +3379,20 @@ "$ref": "ConfigManagementHierarchyControllerConfig", "description": "Hierarchy Controller configuration for the cluster." }, + "management": { + "description": "Enables automatic Feature management.", + "enum": [ + "MANAGEMENT_UNSPECIFIED", + "MANAGEMENT_AUTOMATIC", + "MANAGEMENT_MANUAL" + ], + "enumDescriptions": [ + "Unspecified", + "Google will manage the Feature for the cluster.", + "User will manually manage the Feature for the cluster." + ], + "type": "string" + }, "policyController": { "$ref": "ConfigManagementPolicyController", "description": "Policy Controller configuration for the cluster." @@ -4601,6 +4669,24 @@ }, "type": "object" }, + "ListPermittedScopesResponse": { + "description": "List of permitted Scopes.", + "id": "ListPermittedScopesResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListPermittedScopes` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "scopes": { + "description": "The list of permitted Scopes", + "items": { + "$ref": "Scope" + }, + "type": "array" + } + }, + "type": "object" + }, "ListScopeNamespacesResponse": { "description": "List of fleet namespaces.", "id": "ListScopeNamespacesResponse", diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 0a753c111ad..481ef288ae5 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -1839,6 +1839,18 @@ type ConfigManagementConfigSyncState struct { // "INSTALLING" - CRD is installing RootsyncCrd string `json:"rootsyncCrd,omitempty"` + // State: The state of CS This field summarizes the other fields in this + // message. + // + // Possible values: + // "STATE_UNSPECIFIED" - CS's state cannot be determined. + // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed. + // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed + // successfully. + // "CONFIG_SYNC_ERROR" - CS encounters errors. + // "CONFIG_SYNC_PENDING" - CS is installing or terminating. + State string `json:"state,omitempty"` + // SyncState: The state of ConfigSync's process to sync configs to a // cluster SyncState *ConfigManagementSyncState `json:"syncState,omitempty"` @@ -2319,6 +2331,16 @@ type ConfigManagementMembershipSpec struct { // cluster. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` + // Management: Enables automatic Feature management. + // + // Possible values: + // "MANAGEMENT_UNSPECIFIED" - Unspecified + // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the + // cluster. + // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the + // cluster. + Management string `json:"management,omitempty"` + // PolicyController: Policy Controller configuration for the cluster. PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"` @@ -4466,6 +4488,43 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListPermittedScopesResponse: List of permitted Scopes. +type ListPermittedScopesResponse struct { + // NextPageToken: A token to request the next page of resources from the + // `ListPermittedScopes` method. The value of an empty string means that + // there are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Scopes: The list of permitted Scopes + Scopes []*Scope `json:"scopes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListPermittedScopesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPermittedScopesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListScopeNamespacesResponse: List of fleet namespaces. type ListScopeNamespacesResponse struct { // NextPageToken: A token to request the next page of resources from the @@ -15369,6 +15428,201 @@ func (c *ProjectsLocationsScopesListCall) Pages(ctx context.Context, f func(*Lis } } +// method id "gkehub.projects.locations.scopes.listPermitted": + +type ProjectsLocationsScopesListPermittedCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListPermitted: Lists permitted Scopes. +// +// - parent: The parent (project and location) where the Scope will be +// listed. Specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsScopesService) ListPermitted(parent string) *ProjectsLocationsScopesListPermittedCall { + c := &ProjectsLocationsScopesListPermittedCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// 'page' of resources, `page_size` specifies number of resources to +// return. If unspecified or set to 0, all resources will be returned. +func (c *ProjectsLocationsScopesListPermittedCall) PageSize(pageSize int64) *ProjectsLocationsScopesListPermittedCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to `ListPermittedScopes` which specifies the position +// in the list from where to continue listing the resources. +func (c *ProjectsLocationsScopesListPermittedCall) PageToken(pageToken string) *ProjectsLocationsScopesListPermittedCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsScopesListPermittedCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListPermittedCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesListPermittedCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListPermittedCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesListPermittedCall) Context(ctx context.Context) *ProjectsLocationsScopesListPermittedCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesListPermittedCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesListPermittedCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/scopes:listPermitted") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.scopes.listPermitted" call. +// Exactly one of *ListPermittedScopesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListPermittedScopesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesListPermittedCall) Do(opts ...googleapi.CallOption) (*ListPermittedScopesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListPermittedScopesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists permitted Scopes.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes:listPermitted", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.listPermitted", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to `ListPermittedScopes` which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/scopes:listPermitted", + // "response": { + // "$ref": "ListPermittedScopesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsScopesListPermittedCall) Pages(ctx context.Context, f func(*ListPermittedScopesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "gkehub.projects.locations.scopes.patch": type ProjectsLocationsScopesPatchCall struct { diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index ea3a7ad8363..27bf5ebf29a 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -2024,7 +2024,7 @@ } } }, - "revision": "20240118", + "revision": "20240209", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2822,6 +2822,24 @@ ], "type": "string" }, + "state": { + "description": "The state of CS This field summarizes the other fields in this message.", + "enum": [ + "STATE_UNSPECIFIED", + "CONFIG_SYNC_NOT_INSTALLED", + "CONFIG_SYNC_INSTALLED", + "CONFIG_SYNC_ERROR", + "CONFIG_SYNC_PENDING" + ], + "enumDescriptions": [ + "CS's state cannot be determined.", + "CS is not installed.", + "The expected CS version is installed successfully.", + "CS encounters errors.", + "CS is installing or terminating." + ], + "type": "string" + }, "syncState": { "$ref": "ConfigManagementSyncState", "description": "The state of ConfigSync's process to sync configs to a cluster" @@ -3135,6 +3153,20 @@ "$ref": "ConfigManagementHierarchyControllerConfig", "description": "Hierarchy Controller configuration for the cluster." }, + "management": { + "description": "Enables automatic Feature management.", + "enum": [ + "MANAGEMENT_UNSPECIFIED", + "MANAGEMENT_AUTOMATIC", + "MANAGEMENT_MANUAL" + ], + "enumDescriptions": [ + "Unspecified", + "Google will manage the Feature for the cluster.", + "User will manually manage the Feature for the cluster." + ], + "type": "string" + }, "policyController": { "$ref": "ConfigManagementPolicyController", "description": "Policy Controller configuration for the cluster." diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index cd277184710..352a79ce5ed 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -1658,6 +1658,18 @@ type ConfigManagementConfigSyncState struct { // "INSTALLING" - CRD is installing RootsyncCrd string `json:"rootsyncCrd,omitempty"` + // State: The state of CS This field summarizes the other fields in this + // message. + // + // Possible values: + // "STATE_UNSPECIFIED" - CS's state cannot be determined. + // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed. + // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed + // successfully. + // "CONFIG_SYNC_ERROR" - CS encounters errors. + // "CONFIG_SYNC_PENDING" - CS is installing or terminating. + State string `json:"state,omitempty"` + // SyncState: The state of ConfigSync's process to sync configs to a // cluster SyncState *ConfigManagementSyncState `json:"syncState,omitempty"` @@ -2138,6 +2150,16 @@ type ConfigManagementMembershipSpec struct { // cluster. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` + // Management: Enables automatic Feature management. + // + // Possible values: + // "MANAGEMENT_UNSPECIFIED" - Unspecified + // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the + // cluster. + // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the + // cluster. + Management string `json:"management,omitempty"` + // PolicyController: Policy Controller configuration for the cluster. PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"` diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 3fbae6b076f..5dc5b737f2d 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -7668,7 +7668,7 @@ } } }, - "revision": "20240112", + "revision": "20240207", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BigQueryDataset": { @@ -9694,6 +9694,20 @@ "description": "Describes the settings associated with a project, folder, organization, or billing account.", "id": "Settings", "properties": { + "analyticsMode": { + "description": "Optional. The default analytics mode of an org or folder which is inherited by all newly created child project buckets.", + "enum": [ + "ANALYTICS_MODE_UNSPECIFIED", + "ANALYTICS_ENABLED", + "ANALYTICS_DISABLED" + ], + "enumDescriptions": [ + "No default analytics mode defined at this resource level, it will inherit from the closest ancester which has a defined analytics mode. If there is no specified analytics mode across the resource hierarchy, analytics will be disabled by default.", + "By default, analytics will be enabled for all new project-level buckets unless explicitly specified otherwise at bucket creation time.", + "By default, analytics will be disabled for new project-level buckets unless explicitly specified otherwise at bucket creation time." + ], + "type": "string" + }, "defaultSinkConfig": { "$ref": "DefaultSinkConfig", "description": "Optional. Overrides the built-in configuration for _Default sink." diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index cbecaf0ee50..ae874279e35 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -4418,6 +4418,22 @@ func (s *SavedQuery) MarshalJSON() ([]byte, error) { // Settings: Describes the settings associated with a project, folder, // organization, or billing account. type Settings struct { + // AnalyticsMode: Optional. The default analytics mode of an org or + // folder which is inherited by all newly created child project buckets. + // + // Possible values: + // "ANALYTICS_MODE_UNSPECIFIED" - No default analytics mode defined at + // this resource level, it will inherit from the closest ancester which + // has a defined analytics mode. If there is no specified analytics mode + // across the resource hierarchy, analytics will be disabled by default. + // "ANALYTICS_ENABLED" - By default, analytics will be enabled for all + // new project-level buckets unless explicitly specified otherwise at + // bucket creation time. + // "ANALYTICS_DISABLED" - By default, analytics will be disabled for + // new project-level buckets unless explicitly specified otherwise at + // bucket creation time. + AnalyticsMode string `json:"analyticsMode,omitempty"` + // DefaultSinkConfig: Optional. Overrides the built-in configuration for // _Default sink. DefaultSinkConfig *DefaultSinkConfig `json:"defaultSinkConfig,omitempty"` @@ -4477,21 +4493,20 @@ type Settings struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DefaultSinkConfig") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AnalyticsMode") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultSinkConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AnalyticsMode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } diff --git a/networksecurity/v1beta1/networksecurity-api.json b/networksecurity/v1beta1/networksecurity-api.json index b9a1d8af529..645e37c22d4 100644 --- a/networksecurity/v1beta1/networksecurity-api.json +++ b/networksecurity/v1beta1/networksecurity-api.json @@ -3162,7 +3162,7 @@ } } }, - "revision": "20240130", + "revision": "20240208", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AddAddressGroupItemsRequest": { @@ -3468,7 +3468,7 @@ "type": "array" }, "billingProjectId": { - "description": "Optional. Project to bill on endpoint uptime usage.", + "description": "Required. Project to bill on endpoint uptime usage.", "type": "string" }, "createTime": { diff --git a/networksecurity/v1beta1/networksecurity-gen.go b/networksecurity/v1beta1/networksecurity-gen.go index 09b400f3289..3d7397e75db 100644 --- a/networksecurity/v1beta1/networksecurity-gen.go +++ b/networksecurity/v1beta1/networksecurity-gen.go @@ -839,7 +839,7 @@ type FirewallEndpoint struct { // this list after traffic routing is fully configured. Associations []*FirewallEndpointAssociationReference `json:"associations,omitempty"` - // BillingProjectId: Optional. Project to bill on endpoint uptime usage. + // BillingProjectId: Required. Project to bill on endpoint uptime usage. BillingProjectId string `json:"billingProjectId,omitempty"` // CreateTime: Output only. Create time stamp diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index e34e66947c5..658b7fa2dd9 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -1252,6 +1252,370 @@ } } }, + "lbRouteExtensions": { + "methods": { + "create": { + "description": "Creates a new `LbRouteExtension` resource in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", + "httpMethod": "POST", + "id": "networkservices.projects.locations.lbRouteExtensions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "lbRouteExtensionId": { + "description": "Required. User-provided ID of the `LbRouteExtension` resource to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/lbRouteExtensions", + "request": { + "$ref": "LbRouteExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified `LbRouteExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.lbRouteExtensions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of the specified `LbRouteExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbRouteExtensions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "LbRouteExtension" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `LbRouteExtension` resources in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbRouteExtensions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results that the server returns.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the `LbRouteExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/lbRouteExtensions", + "response": { + "$ref": "ListLbRouteExtensionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of the specified `LbRouteExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.lbRouteExtensions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "LbRouteExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "lbTrafficExtensions": { + "methods": { + "create": { + "description": "Creates a new `LbTrafficExtension` resource in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + "httpMethod": "POST", + "id": "networkservices.projects.locations.lbTrafficExtensions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "lbTrafficExtensionId": { + "description": "Required. User-provided ID of the `LbTrafficExtension` resource to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/lbTrafficExtensions", + "request": { + "$ref": "LbTrafficExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified `LbTrafficExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.lbTrafficExtensions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of the specified `LbTrafficExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbTrafficExtensions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "LbTrafficExtension" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `LbTrafficExtension` resources in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbTrafficExtensions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results that the server returns.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the `LbTrafficExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/lbTrafficExtensions", + "response": { + "$ref": "ListLbTrafficExtensionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of the specified `LbTrafficExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.lbTrafficExtensions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "LbTrafficExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "meshes": { "methods": { "create": { @@ -1758,14 +2122,258 @@ "parent": { "description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/global`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/serviceBindings", + "response": { + "$ref": "ListServiceBindingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serviceLbPolicies": { + "methods": { + "create": { + "description": "Creates a new ServiceLbPolicy in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", + "httpMethod": "POST", + "id": "networkservices.projects.locations.serviceLbPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "serviceLbPolicyId": { + "description": "Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/serviceLbPolicies", + "request": { + "$ref": "ServiceLbPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single ServiceLbPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.serviceLbPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ServiceLbPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.serviceLbPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ServiceLbPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:getIamPolicy", + "httpMethod": "GET", + "id": "networkservices.projects.locations.serviceLbPolicies.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ServiceLbPolicies in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", + "httpMethod": "GET", + "id": "networkservices.projects.locations.serviceLbPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of ServiceLbPolicies to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListServiceLbPoliciesResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/serviceLbPolicies", + "response": { + "$ref": "ListServiceLbPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single ServiceLbPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.serviceLbPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, - "path": "v1/{+parent}/serviceBindings", + "path": "v1/{+name}", + "request": { + "$ref": "ServiceLbPolicy" + }, "response": { - "$ref": "ListServiceBindingsResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -1773,9 +2381,9 @@ }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:setIamPolicy", "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", + "id": "networkservices.projects.locations.serviceLbPolicies.setIamPolicy", "parameterOrder": [ "resource" ], @@ -1783,7 +2391,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", "required": true, "type": "string" } @@ -1801,9 +2409,9 @@ }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:testIamPermissions", "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", + "id": "networkservices.projects.locations.serviceLbPolicies.testIamPermissions", "parameterOrder": [ "resource" ], @@ -1811,7 +2419,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", "required": true, "type": "string" } @@ -2148,7 +2756,7 @@ } } }, - "revision": "20240125", + "revision": "20240207", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2378,8 +2986,97 @@ }, "type": "object" }, + "ExtensionChain": { + "description": "A single extension chain wrapper that contains the match conditions and extensions to execute.", + "id": "ExtensionChain", + "properties": { + "extensions": { + "description": "Required. A set of extensions to execute for the matching request. At least one extension is required. Up to 3 extensions can be defined for each extension chain for `LbTrafficExtension` resource. `LbRouteExtension` chains are limited to 1 extension per extension chain.", + "items": { + "$ref": "ExtensionChainExtension" + }, + "type": "array" + }, + "matchCondition": { + "$ref": "ExtensionChainMatchCondition", + "description": "Required. Conditions under which this chain is invoked for a request." + }, + "name": { + "description": "Required. The name for this extension chain. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", + "type": "string" + } + }, + "type": "object" + }, + "ExtensionChainExtension": { + "description": "A single extension in the chain to execute for the matching request.", + "id": "ExtensionChainExtension", + "properties": { + "authority": { + "description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service.", + "type": "string" + }, + "failOpen": { + "description": "Optional. Determines how the proxy behaves if the call to the extension fails or times out. When set to `TRUE`, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to `FALSE`: * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer. * If response headers have been delivered, then the HTTP stream to the downstream client is reset. Default is `FALSE`.", + "type": "boolean" + }, + "forwardHeaders": { + "description": "Optional. List of the HTTP headers to forward to the extension (from the client or backend). If omitted, all headers are sent. Each element is a string indicating the header name.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Required. The name for this extension. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", + "type": "string" + }, + "service": { + "description": "Required. The reference to the service that runs the extension. Currently only Callout extensions are supported here. To configure a Callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", + "type": "string" + }, + "supportedEvents": { + "description": "Optional. A set of events during request or response processing for which this extension is called. This field is required for the `LbTrafficExtension` resource. It's not relevant for the `LbRouteExtension` resource.", + "items": { + "enum": [ + "EVENT_TYPE_UNSPECIFIED", + "REQUEST_HEADERS", + "REQUEST_BODY", + "RESPONSE_HEADERS", + "RESPONSE_BODY" + ], + "enumDescriptions": [ + "Unspecified value. Do not use.", + "If included in `supported_events`, the extension is called when the HTTP request headers arrive.", + "If included in `supported_events`, the extension is called when the HTTP request body arrives.", + "If included in `supported_events`, the extension is called when the HTTP response headers arrive.", + "If included in `supported_events`, the extension is called when the HTTP response body arrives." + ], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "description": "Required. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "ExtensionChainMatchCondition": { + "description": "Conditions under which this chain is invoked for a request.", + "id": "ExtensionChainMatchCondition", + "properties": { + "celExpression": { + "description": "Required. A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. For more information, see [CEL matcher language reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).", + "type": "string" + } + }, + "type": "object" + }, "Gateway": { - "description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 30", + "description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 32", "id": "Gateway", "properties": { "addresses": { @@ -3358,6 +4055,130 @@ }, "type": "object" }, + "LbRouteExtension": { + "description": "`LbRouteExtension` is a resource that lets you control where traffic is routed to for a given request.", + "id": "LbRouteExtension", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. A human-readable description of the resource.", + "type": "string" + }, + "extensionChains": { + "description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", + "items": { + "$ref": "ExtensionChain" + }, + "type": "array" + }, + "forwardingRules": { + "description": "Required. A list of references to the forwarding rules to which this service extension is attached to. At least one forwarding rule is required. There can be only one `LbRouteExtension` resource per forwarding rule.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of labels associated with the `LbRouteExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "type": "object" + }, + "loadBalancingScheme": { + "description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).", + "enum": [ + "LOAD_BALANCING_SCHEME_UNSPECIFIED", + "INTERNAL_MANAGED", + "EXTERNAL_MANAGED" + ], + "enumDescriptions": [ + "Default value. Do not use.", + "Signifies that this is used for Internal HTTP(S) Load Balancing.", + "Signifies that this is used for External Managed HTTP(S) Load Balancing." + ], + "type": "string" + }, + "name": { + "description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "LbTrafficExtension": { + "description": "`LbTrafficExtension` is a resource that lets the extension service modify the headers and payloads of both requests and responses without impacting the choice of backend services or any other security policies associated with the backend service.", + "id": "LbTrafficExtension", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. A human-readable description of the resource.", + "type": "string" + }, + "extensionChains": { + "description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", + "items": { + "$ref": "ExtensionChain" + }, + "type": "array" + }, + "forwardingRules": { + "description": "Required. A list of references to the forwarding rules to which this service extension is attached to. At least one forwarding rule is required. There can be only one `LBTrafficExtension` resource per forwarding rule.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of labels associated with the `LbTrafficExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "type": "object" + }, + "loadBalancingScheme": { + "description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).", + "enum": [ + "LOAD_BALANCING_SCHEME_UNSPECIFIED", + "INTERNAL_MANAGED", + "EXTERNAL_MANAGED" + ], + "enumDescriptions": [ + "Default value. Do not use.", + "Signifies that this is used for Internal HTTP(S) Load Balancing.", + "Signifies that this is used for External Managed HTTP(S) Load Balancing." + ], + "type": "string" + }, + "name": { + "description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListEndpointPoliciesResponse": { "description": "Response returned by the ListEndpointPolicies method.", "id": "ListEndpointPoliciesResponse", @@ -3437,6 +4258,56 @@ }, "type": "object" }, + "ListLbRouteExtensionsResponse": { + "description": "Message for response to listing `LbRouteExtension` resources.", + "id": "ListLbRouteExtensionsResponse", + "properties": { + "lbRouteExtensions": { + "description": "The list of `LbRouteExtension` resources.", + "items": { + "$ref": "LbRouteExtension" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results that the server returns.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLbTrafficExtensionsResponse": { + "description": "Message for response to listing `LbTrafficExtension` resources.", + "id": "ListLbTrafficExtensionsResponse", + "properties": { + "lbTrafficExtensions": { + "description": "The list of `LbTrafficExtension` resources.", + "items": { + "$ref": "LbTrafficExtension" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results that the server returns.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -3509,6 +4380,24 @@ }, "type": "object" }, + "ListServiceLbPoliciesResponse": { + "description": "Response returned by the ListServiceLbPolicies method.", + "id": "ListServiceLbPoliciesResponse", + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", + "type": "string" + }, + "serviceLbPolicies": { + "description": "List of ServiceLbPolicy resources.", + "items": { + "$ref": "ServiceLbPolicy" + }, + "type": "array" + } + }, + "type": "object" + }, "ListTcpRoutesResponse": { "description": "Response returned by the ListTcpRoutes method.", "id": "ListTcpRoutesResponse", @@ -3790,6 +4679,89 @@ }, "type": "object" }, + "ServiceLbPolicy": { + "description": "ServiceLbPolicy holds global load balancing and traffic distribution configuration that can be applied to a BackendService.", + "id": "ServiceLbPolicy", + "properties": { + "autoCapacityDrain": { + "$ref": "ServiceLbPolicyAutoCapacityDrain", + "description": "Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service." + }, + "createTime": { + "description": "Output only. The timestamp when this resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. A free-text description of the resource. Max length 1024 characters.", + "type": "string" + }, + "failoverConfig": { + "$ref": "ServiceLbPolicyFailoverConfig", + "description": "Optional. Configuration related to health based failover." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the ServiceLbPolicy resource.", + "type": "object" + }, + "loadBalancingAlgorithm": { + "description": "Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.", + "enum": [ + "LOAD_BALANCING_ALGORITHM_UNSPECIFIED", + "SPRAY_TO_WORLD", + "SPRAY_TO_REGION", + "WATERFALL_BY_REGION", + "WATERFALL_BY_ZONE" + ], + "enumDescriptions": [ + "The type of the loadbalancing algorithm is unspecified.", + "Balance traffic across all backends across the world proportionally based on capacity.", + "Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions and spread the traffic from each client to all the MIGs/NEGs in a region.", + "Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions. All MIGs/NEGs within a region are evenly loaded but each client might not spread the traffic to all the MIGs/NEGs in the region.", + "Attempt to keep traffic in a single zone closest to the client, before spilling over to other zones." + ], + "type": "string" + }, + "name": { + "description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when this resource was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceLbPolicyAutoCapacityDrain": { + "description": "Option to specify if an unhealthy IG/NEG should be considered for global load balancing and traffic routing.", + "id": "ServiceLbPolicyAutoCapacityDrain", + "properties": { + "enable": { + "description": "Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy. - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.", + "type": "boolean" + } + }, + "type": "object" + }, + "ServiceLbPolicyFailoverConfig": { + "description": "Option to specify health based failover behavior. This is not related to Network load balancer FailoverPolicy.", + "id": "ServiceLbPolicyFailoverConfig", + "properties": { + "failoverHealthThreshold": { + "description": "Optional. The percentage threshold that a load balancer will begin to send traffic to failover backends. If the percentage of endpoints in a MIG/NEG is smaller than this value, traffic would be sent to failover backends if possible. This field should be set to a value between 1 and 99. The default value is 50 for Global external HTTP(S) load balancer (classic) and Proxyless service mesh, and 70 for others.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index a239524fbef..d8c3a407acb 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -176,9 +176,12 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Gateways = NewProjectsLocationsGatewaysService(s) rs.GrpcRoutes = NewProjectsLocationsGrpcRoutesService(s) rs.HttpRoutes = NewProjectsLocationsHttpRoutesService(s) + rs.LbRouteExtensions = NewProjectsLocationsLbRouteExtensionsService(s) + rs.LbTrafficExtensions = NewProjectsLocationsLbTrafficExtensionsService(s) rs.Meshes = NewProjectsLocationsMeshesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.ServiceBindings = NewProjectsLocationsServiceBindingsService(s) + rs.ServiceLbPolicies = NewProjectsLocationsServiceLbPoliciesService(s) rs.TcpRoutes = NewProjectsLocationsTcpRoutesService(s) rs.TlsRoutes = NewProjectsLocationsTlsRoutesService(s) return rs @@ -201,12 +204,18 @@ type ProjectsLocationsService struct { HttpRoutes *ProjectsLocationsHttpRoutesService + LbRouteExtensions *ProjectsLocationsLbRouteExtensionsService + + LbTrafficExtensions *ProjectsLocationsLbTrafficExtensionsService + Meshes *ProjectsLocationsMeshesService Operations *ProjectsLocationsOperationsService ServiceBindings *ProjectsLocationsServiceBindingsService + ServiceLbPolicies *ProjectsLocationsServiceLbPoliciesService + TcpRoutes *ProjectsLocationsTcpRoutesService TlsRoutes *ProjectsLocationsTlsRoutesService @@ -275,6 +284,24 @@ type ProjectsLocationsHttpRoutesService struct { s *Service } +func NewProjectsLocationsLbRouteExtensionsService(s *Service) *ProjectsLocationsLbRouteExtensionsService { + rs := &ProjectsLocationsLbRouteExtensionsService{s: s} + return rs +} + +type ProjectsLocationsLbRouteExtensionsService struct { + s *Service +} + +func NewProjectsLocationsLbTrafficExtensionsService(s *Service) *ProjectsLocationsLbTrafficExtensionsService { + rs := &ProjectsLocationsLbTrafficExtensionsService{s: s} + return rs +} + +type ProjectsLocationsLbTrafficExtensionsService struct { + s *Service +} + func NewProjectsLocationsMeshesService(s *Service) *ProjectsLocationsMeshesService { rs := &ProjectsLocationsMeshesService{s: s} return rs @@ -302,6 +329,15 @@ type ProjectsLocationsServiceBindingsService struct { s *Service } +func NewProjectsLocationsServiceLbPoliciesService(s *Service) *ProjectsLocationsServiceLbPoliciesService { + rs := &ProjectsLocationsServiceLbPoliciesService{s: s} + return rs +} + +type ProjectsLocationsServiceLbPoliciesService struct { + s *Service +} + func NewProjectsLocationsTcpRoutesService(s *Service) *ProjectsLocationsTcpRoutesService { rs := &ProjectsLocationsTcpRoutesService{s: s} return rs @@ -825,11 +861,175 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExtensionChain: A single extension chain wrapper that contains the +// match conditions and extensions to execute. +type ExtensionChain struct { + // Extensions: Required. A set of extensions to execute for the matching + // request. At least one extension is required. Up to 3 extensions can + // be defined for each extension chain for `LbTrafficExtension` + // resource. `LbRouteExtension` chains are limited to 1 extension per + // extension chain. + Extensions []*ExtensionChainExtension `json:"extensions,omitempty"` + + // MatchCondition: Required. Conditions under which this chain is + // invoked for a request. + MatchCondition *ExtensionChainMatchCondition `json:"matchCondition,omitempty"` + + // Name: Required. The name for this extension chain. The name is logged + // as part of the HTTP request logs. The name must conform with + // RFC-1034, is restricted to lower-cased letters, numbers and hyphens, + // and can have a maximum length of 63 characters. Additionally, the + // first character must be a letter and the last a letter or a number. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Extensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Extensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExtensionChain) MarshalJSON() ([]byte, error) { + type NoMethod ExtensionChain + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExtensionChainExtension: A single extension in the chain to execute +// for the matching request. +type ExtensionChainExtension struct { + // Authority: Optional. The `:authority` header in the gRPC request sent + // from Envoy to the extension service. + Authority string `json:"authority,omitempty"` + + // FailOpen: Optional. Determines how the proxy behaves if the call to + // the extension fails or times out. When set to `TRUE`, request or + // response processing continues without error. Any subsequent + // extensions in the extension chain are also executed. When set to + // `FALSE`: * If response headers have not been delivered to the + // downstream client, a generic 500 error is returned to the client. The + // error response can be tailored by configuring a custom error response + // in the load balancer. * If response headers have been delivered, then + // the HTTP stream to the downstream client is reset. Default is + // `FALSE`. + FailOpen bool `json:"failOpen,omitempty"` + + // ForwardHeaders: Optional. List of the HTTP headers to forward to the + // extension (from the client or backend). If omitted, all headers are + // sent. Each element is a string indicating the header name. + ForwardHeaders []string `json:"forwardHeaders,omitempty"` + + // Name: Required. The name for this extension. The name is logged as + // part of the HTTP request logs. The name must conform with RFC-1034, + // is restricted to lower-cased letters, numbers and hyphens, and can + // have a maximum length of 63 characters. Additionally, the first + // character must be a letter and the last a letter or a number. + Name string `json:"name,omitempty"` + + // Service: Required. The reference to the service that runs the + // extension. Currently only Callout extensions are supported here. To + // configure a Callout extension, `service` must be a fully-qualified + // reference to a backend service + // (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + // in the format: + // `https://www.googleapis.com/compute/v1/projects/{project}/regions/{reg + // ion}/backendServices/{backendService}` or + // `https://www.googleapis.com/compute/v1/projects/{project}/global/backe + // ndServices/{backendService}`. + Service string `json:"service,omitempty"` + + // SupportedEvents: Optional. A set of events during request or response + // processing for which this extension is called. This field is required + // for the `LbTrafficExtension` resource. It's not relevant for the + // `LbRouteExtension` resource. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - Unspecified value. Do not use. + // "REQUEST_HEADERS" - If included in `supported_events`, the + // extension is called when the HTTP request headers arrive. + // "REQUEST_BODY" - If included in `supported_events`, the extension + // is called when the HTTP request body arrives. + // "RESPONSE_HEADERS" - If included in `supported_events`, the + // extension is called when the HTTP response headers arrive. + // "RESPONSE_BODY" - If included in `supported_events`, the extension + // is called when the HTTP response body arrives. + SupportedEvents []string `json:"supportedEvents,omitempty"` + + // Timeout: Required. Specifies the timeout for each individual message + // on the stream. The timeout must be between 10-1000 milliseconds. + Timeout string `json:"timeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Authority") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Authority") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExtensionChainExtension) MarshalJSON() ([]byte, error) { + type NoMethod ExtensionChainExtension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExtensionChainMatchCondition: Conditions under which this chain is +// invoked for a request. +type ExtensionChainMatchCondition struct { + // CelExpression: Required. A Common Expression Language (CEL) + // expression that is used to match requests for which the extension + // chain is executed. For more information, see CEL matcher language + // reference + // (https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). + CelExpression string `json:"celExpression,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CelExpression") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CelExpression") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) { + type NoMethod ExtensionChainMatchCondition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Gateway: Gateway represents the configuration for a proxy, typically // a load balancer. It captures the ip:port over which the services are // exposed by the proxy, along with any policy configurations. Routes // have reference to to Gateways to dictate how requests should be -// routed by this Gateway. Next id: 30 +// routed by this Gateway. Next id: 32 type Gateway struct { // Addresses: Optional. Zero or one IPv4 or IPv6 address on which the // Gateway will receive the traffic. When no address is provided, an IP @@ -2468,6 +2668,166 @@ func (s *HttpRouteURLRewrite) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LbRouteExtension: `LbRouteExtension` is a resource that lets you +// control where traffic is routed to for a given request. +type LbRouteExtension struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. A human-readable description of the resource. + Description string `json:"description,omitempty"` + + // ExtensionChains: Required. A set of ordered extension chains that + // contain the match conditions and extensions to execute. Match + // conditions for each extension chain are evaluated in sequence for a + // given request. The first extension chain that has a condition that + // matches the request is executed. Any subsequent extension chains do + // not execute. Limited to 5 extension chains per resource. + ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"` + + // ForwardingRules: Required. A list of references to the forwarding + // rules to which this service extension is attached to. At least one + // forwarding rule is required. There can be only one `LbRouteExtension` + // resource per forwarding rule. + ForwardingRules []string `json:"forwardingRules,omitempty"` + + // Labels: Optional. Set of labels associated with the + // `LbRouteExtension` resource. The format must comply with the + // following requirements + // (/compute/docs/labeling-resources#requirements). + Labels map[string]string `json:"labels,omitempty"` + + // LoadBalancingScheme: Required. All backend services and forwarding + // rules referenced by this extension must share the same load balancing + // scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For + // more information, refer to Choosing a load balancer + // (https://cloud.google.com/load-balancing/docs/backend-service). + // + // Possible values: + // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use. + // "INTERNAL_MANAGED" - Signifies that this is used for Internal + // HTTP(S) Load Balancing. + // "EXTERNAL_MANAGED" - Signifies that this is used for External + // Managed HTTP(S) Load Balancing. + LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + + // Name: Required. Identifier. Name of the `LbRouteExtension` resource + // in the following format: + // `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_e + // xtension}`. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LbRouteExtension) MarshalJSON() ([]byte, error) { + type NoMethod LbRouteExtension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LbTrafficExtension: `LbTrafficExtension` is a resource that lets the +// extension service modify the headers and payloads of both requests +// and responses without impacting the choice of backend services or any +// other security policies associated with the backend service. +type LbTrafficExtension struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. A human-readable description of the resource. + Description string `json:"description,omitempty"` + + // ExtensionChains: Required. A set of ordered extension chains that + // contain the match conditions and extensions to execute. Match + // conditions for each extension chain are evaluated in sequence for a + // given request. The first extension chain that has a condition that + // matches the request is executed. Any subsequent extension chains do + // not execute. Limited to 5 extension chains per resource. + ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"` + + // ForwardingRules: Required. A list of references to the forwarding + // rules to which this service extension is attached to. At least one + // forwarding rule is required. There can be only one + // `LBTrafficExtension` resource per forwarding rule. + ForwardingRules []string `json:"forwardingRules,omitempty"` + + // Labels: Optional. Set of labels associated with the + // `LbTrafficExtension` resource. The format must comply with the + // following requirements + // (/compute/docs/labeling-resources#requirements). + Labels map[string]string `json:"labels,omitempty"` + + // LoadBalancingScheme: Required. All backend services and forwarding + // rules referenced by this extension must share the same load balancing + // scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For + // more information, refer to Choosing a load balancer + // (https://cloud.google.com/load-balancing/docs/backend-service). + // + // Possible values: + // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use. + // "INTERNAL_MANAGED" - Signifies that this is used for Internal + // HTTP(S) Load Balancing. + // "EXTERNAL_MANAGED" - Signifies that this is used for External + // Managed HTTP(S) Load Balancing. + LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + + // Name: Required. Identifier. Name of the `LbTrafficExtension` resource + // in the following format: + // `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traff + // ic_extension}`. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LbTrafficExtension) MarshalJSON() ([]byte, error) { + type NoMethod LbTrafficExtension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListEndpointPoliciesResponse: Response returned by the // ListEndpointPolicies method. type ListEndpointPoliciesResponse struct { @@ -2627,6 +2987,88 @@ func (s *ListHttpRoutesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListLbRouteExtensionsResponse: Message for response to listing +// `LbRouteExtension` resources. +type ListLbRouteExtensionsResponse struct { + // LbRouteExtensions: The list of `LbRouteExtension` resources. + LbRouteExtensions []*LbRouteExtension `json:"lbRouteExtensions,omitempty"` + + // NextPageToken: A token identifying a page of results that the server + // returns. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "LbRouteExtensions") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LbRouteExtensions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListLbRouteExtensionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLbRouteExtensionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLbTrafficExtensionsResponse: Message for response to listing +// `LbTrafficExtension` resources. +type ListLbTrafficExtensionsResponse struct { + // LbTrafficExtensions: The list of `LbTrafficExtension` resources. + LbTrafficExtensions []*LbTrafficExtension `json:"lbTrafficExtensions,omitempty"` + + // NextPageToken: A token identifying a page of results that the server + // returns. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "LbTrafficExtensions") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LbTrafficExtensions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListLbTrafficExtensionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLbTrafficExtensionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for // Locations.ListLocations. type ListLocationsResponse struct { @@ -2778,16 +3220,17 @@ func (s *ListServiceBindingsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListTcpRoutesResponse: Response returned by the ListTcpRoutes method. -type ListTcpRoutesResponse struct { +// ListServiceLbPoliciesResponse: Response returned by the +// ListServiceLbPolicies method. +type ListServiceLbPoliciesResponse struct { // NextPageToken: If there might be more results than those appearing in // this response, then `next_page_token` is included. To get the next // set of results, call this method again using the value of // `next_page_token` as `page_token`. NextPageToken string `json:"nextPageToken,omitempty"` - // TcpRoutes: List of TcpRoute resources. - TcpRoutes []*TcpRoute `json:"tcpRoutes,omitempty"` + // ServiceLbPolicies: List of ServiceLbPolicy resources. + ServiceLbPolicies []*ServiceLbPolicy `json:"serviceLbPolicies,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -2810,22 +3253,22 @@ type ListTcpRoutesResponse struct { NullFields []string `json:"-"` } -func (s *ListTcpRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTcpRoutesResponse +func (s *ListServiceLbPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServiceLbPoliciesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListTlsRoutesResponse: Response returned by the ListTlsRoutes method. -type ListTlsRoutesResponse struct { +// ListTcpRoutesResponse: Response returned by the ListTcpRoutes method. +type ListTcpRoutesResponse struct { // NextPageToken: If there might be more results than those appearing in // this response, then `next_page_token` is included. To get the next // set of results, call this method again using the value of // `next_page_token` as `page_token`. NextPageToken string `json:"nextPageToken,omitempty"` - // TlsRoutes: List of TlsRoute resources. - TlsRoutes []*TlsRoute `json:"tlsRoutes,omitempty"` + // TcpRoutes: List of TcpRoute resources. + TcpRoutes []*TcpRoute `json:"tcpRoutes,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -2848,23 +3291,61 @@ type ListTlsRoutesResponse struct { NullFields []string `json:"-"` } -func (s *ListTlsRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTlsRoutesResponse +func (s *ListTcpRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTcpRoutesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents a Google Cloud location. -type Location struct { - // DisplayName: The friendly name for this location, typically a nearby - // city name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` - - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` - - // LocationId: The canonical id for this location. For example: +// ListTlsRoutesResponse: Response returned by the ListTlsRoutes method. +type ListTlsRoutesResponse struct { + // NextPageToken: If there might be more results than those appearing in + // this response, then `next_page_token` is included. To get the next + // set of results, call this method again using the value of + // `next_page_token` as `page_token`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TlsRoutes: List of TlsRoute resources. + TlsRoutes []*TlsRoute `json:"tlsRoutes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListTlsRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTlsRoutesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: // "us-east1". LocationId string `json:"locationId,omitempty"` @@ -3263,6 +3744,159 @@ func (s *ServiceBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceLbPolicy: ServiceLbPolicy holds global load balancing and +// traffic distribution configuration that can be applied to a +// BackendService. +type ServiceLbPolicy struct { + // AutoCapacityDrain: Optional. Configuration to automatically move + // traffic away for unhealthy IG/NEG for the associated Backend Service. + AutoCapacityDrain *ServiceLbPolicyAutoCapacityDrain `json:"autoCapacityDrain,omitempty"` + + // CreateTime: Output only. The timestamp when this resource was + // created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. A free-text description of the resource. Max + // length 1024 characters. + Description string `json:"description,omitempty"` + + // FailoverConfig: Optional. Configuration related to health based + // failover. + FailoverConfig *ServiceLbPolicyFailoverConfig `json:"failoverConfig,omitempty"` + + // Labels: Optional. Set of label tags associated with the + // ServiceLbPolicy resource. + Labels map[string]string `json:"labels,omitempty"` + + // LoadBalancingAlgorithm: Optional. The type of load balancing + // algorithm to be used. The default behavior is WATERFALL_BY_REGION. + // + // Possible values: + // "LOAD_BALANCING_ALGORITHM_UNSPECIFIED" - The type of the + // loadbalancing algorithm is unspecified. + // "SPRAY_TO_WORLD" - Balance traffic across all backends across the + // world proportionally based on capacity. + // "SPRAY_TO_REGION" - Direct traffic to the nearest region with + // endpoints and capacity before spilling over to other regions and + // spread the traffic from each client to all the MIGs/NEGs in a region. + // "WATERFALL_BY_REGION" - Direct traffic to the nearest region with + // endpoints and capacity before spilling over to other regions. All + // MIGs/NEGs within a region are evenly loaded but each client might not + // spread the traffic to all the MIGs/NEGs in the region. + // "WATERFALL_BY_ZONE" - Attempt to keep traffic in a single zone + // closest to the client, before spilling over to other zones. + LoadBalancingAlgorithm string `json:"loadBalancingAlgorithm,omitempty"` + + // Name: Required. Name of the ServiceLbPolicy resource. It matches + // pattern + // `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb + // _policy_name}`. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when this resource was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AutoCapacityDrain") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AutoCapacityDrain") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ServiceLbPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ServiceLbPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceLbPolicyAutoCapacityDrain: Option to specify if an unhealthy +// IG/NEG should be considered for global load balancing and traffic +// routing. +type ServiceLbPolicyAutoCapacityDrain struct { + // Enable: Optional. If set to 'True', an unhealthy IG/NEG will be set + // as drained. - An IG/NEG is considered unhealthy if less than 25% of + // the instances/endpoints in the IG/NEG are healthy. - This option will + // never result in draining more than 50% of the configured IGs/NEGs for + // the Backend Service. + Enable bool `json:"enable,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enable") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceLbPolicyAutoCapacityDrain) MarshalJSON() ([]byte, error) { + type NoMethod ServiceLbPolicyAutoCapacityDrain + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceLbPolicyFailoverConfig: Option to specify health based +// failover behavior. This is not related to Network load balancer +// FailoverPolicy. +type ServiceLbPolicyFailoverConfig struct { + // FailoverHealthThreshold: Optional. The percentage threshold that a + // load balancer will begin to send traffic to failover backends. If the + // percentage of endpoints in a MIG/NEG is smaller than this value, + // traffic would be sent to failover backends if possible. This field + // should be set to a value between 1 and 99. The default value is 50 + // for Global external HTTP(S) load balancer (classic) and Proxyless + // service mesh, and 70 for others. + FailoverHealthThreshold int64 `json:"failoverHealthThreshold,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "FailoverHealthThreshold") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FailoverHealthThreshold") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ServiceLbPolicyFailoverConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceLbPolicyFailoverConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the @@ -9769,39 +10403,58 @@ func (c *ProjectsLocationsHttpRoutesPatchCall) Do(opts ...googleapi.CallOption) } -// method id "networkservices.projects.locations.meshes.create": +// method id "networkservices.projects.locations.lbRouteExtensions.create": -type ProjectsLocationsMeshesCreateCall struct { - s *Service - parent string - mesh *Mesh - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbRouteExtensionsCreateCall struct { + s *Service + parent string + lbrouteextension *LbRouteExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Mesh in a given project and location. +// Create: Creates a new `LbRouteExtension` resource in a given project +// and location. // -// - parent: The parent resource of the Mesh. Must be in the format -// `projects/*/locations/global`. -func (r *ProjectsLocationsMeshesService) Create(parent string, mesh *Mesh) *ProjectsLocationsMeshesCreateCall { - c := &ProjectsLocationsMeshesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource of the `LbRouteExtension` resource. +// Must be in the format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Create(parent string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsCreateCall { + c := &ProjectsLocationsLbRouteExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.mesh = mesh + c.lbrouteextension = lbrouteextension return c } -// MeshId sets the optional parameter "meshId": Required. Short name of -// the Mesh resource to be created. -func (c *ProjectsLocationsMeshesCreateCall) MeshId(meshId string) *ProjectsLocationsMeshesCreateCall { - c.urlParams_.Set("meshId", meshId) +// LbRouteExtensionId sets the optional parameter "lbRouteExtensionId": +// Required. User-provided ID of the `LbRouteExtension` resource to be +// created. +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) LbRouteExtensionId(lbRouteExtensionId string) *ProjectsLocationsLbRouteExtensionsCreateCall { + c.urlParams_.Set("lbRouteExtensionId", lbRouteExtensionId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9809,21 +10462,21 @@ func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *Projec // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesCreateCall) Context(ctx context.Context) *ProjectsLocationsMeshesCreateCall { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesCreateCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -9831,14 +10484,14 @@ func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbRouteExtensions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -9851,14 +10504,14 @@ func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.create" call. +// Do executes the "networkservices.projects.locations.lbRouteExtensions.create" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9889,30 +10542,35 @@ func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Creates a new Mesh in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", + // "description": "Creates a new `LbRouteExtension` resource in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", // "httpMethod": "POST", - // "id": "networkservices.projects.locations.meshes.create", + // "id": "networkservices.projects.locations.lbRouteExtensions.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "meshId": { - // "description": "Required. Short name of the Mesh resource to be created.", + // "lbRouteExtensionId": { + // "description": "Required. User-provided ID of the `LbRouteExtension` resource to be created.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.", + // "description": "Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/meshes", + // "path": "v1/{+parent}/lbRouteExtensions", // "request": { - // "$ref": "Mesh" + // "$ref": "LbRouteExtension" // }, // "response": { // "$ref": "Operation" @@ -9924,9 +10582,9 @@ func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*O } -// method id "networkservices.projects.locations.meshes.delete": +// method id "networkservices.projects.locations.lbRouteExtensions.delete": -type ProjectsLocationsMeshesDeleteCall struct { +type ProjectsLocationsLbRouteExtensionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -9934,20 +10592,39 @@ type ProjectsLocationsMeshesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Mesh. +// Delete: Deletes the specified `LbRouteExtension` resource. // -// - name: A name of the Mesh to delete. Must be in the format -// `projects/*/locations/global/meshes/*`. -func (r *ProjectsLocationsMeshesService) Delete(name string) *ProjectsLocationsMeshesDeleteCall { - c := &ProjectsLocationsMeshesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the `LbRouteExtension` resource to delete. Must +// be in the format +// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route +// _extension}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Delete(name string) *ProjectsLocationsLbRouteExtensionsDeleteCall { + c := &ProjectsLocationsLbRouteExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes after the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesDeleteCall { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9955,21 +10632,21 @@ func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *Projec // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMeshesDeleteCall { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -9992,14 +10669,14 @@ func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.delete" call. +// Do executes the "networkservices.projects.locations.lbRouteExtensions.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10030,20 +10707,25 @@ func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Deletes a single Mesh.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "description": "Deletes the specified `LbRouteExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", // "httpMethod": "DELETE", - // "id": "networkservices.projects.locations.meshes.delete", + // "id": "networkservices.projects.locations.lbRouteExtensions.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.", + // "description": "Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", @@ -10057,9 +10739,9 @@ func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*O } -// method id "networkservices.projects.locations.meshes.get": +// method id "networkservices.projects.locations.lbRouteExtensions.get": -type ProjectsLocationsMeshesGetCall struct { +type ProjectsLocationsLbRouteExtensionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -10068,12 +10750,14 @@ type ProjectsLocationsMeshesGetCall struct { header_ http.Header } -// Get: Gets details of a single Mesh. +// Get: Gets details of the specified `LbRouteExtension` resource. // -// - name: A name of the Mesh to get. Must be in the format -// `projects/*/locations/global/meshes/*`. -func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMeshesGetCall { - c := &ProjectsLocationsMeshesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: A name of the `LbRouteExtension` resource to get. Must be in +// the format +// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route +// _extension}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Get(name string) *ProjectsLocationsLbRouteExtensionsGetCall { + c := &ProjectsLocationsLbRouteExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -10081,7 +10765,7 @@ func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMesh // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetCall { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10091,7 +10775,7 @@ func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsL // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetCall { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -10099,21 +10783,21 @@ func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *Projects // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetCall { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesGetCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10139,14 +10823,14 @@ func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.get" call. -// Exactly one of *Mesh or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Mesh.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh, error) { +// Do executes the "networkservices.projects.locations.lbRouteExtensions.get" call. +// Exactly one of *LbRouteExtension or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *LbRouteExtension.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLbRouteExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbRouteExtension, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10165,7 +10849,7 @@ func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Mesh{ + ret := &LbRouteExtension{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10177,25 +10861,25 @@ func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh } return ret, nil // { - // "description": "Gets details of a single Mesh.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "description": "Gets details of the specified `LbRouteExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.meshes.get", + // "id": "networkservices.projects.locations.lbRouteExtensions.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.", + // "description": "Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Mesh" + // "$ref": "LbRouteExtension" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10204,53 +10888,61 @@ func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh } -// method id "networkservices.projects.locations.meshes.getIamPolicy": +// method id "networkservices.projects.locations.lbRouteExtensions.list": -type ProjectsLocationsMeshesGetIamPolicyCall struct { +type ProjectsLocationsLbRouteExtensionsListCall struct { s *Service - resource string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// List: Lists `LbRouteExtension` resources in a given project and +// location. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsMeshesService) GetIamPolicy(resource string) *ProjectsLocationsMeshesGetIamPolicyCall { - c := &ProjectsLocationsMeshesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The project and location from which the `LbRouteExtension` +// resources are listed, specified in the following format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbRouteExtensionsService) List(parent string) *ProjectsLocationsLbRouteExtensionsListCall { + c := &ProjectsLocationsLbRouteExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsMeshesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMeshesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsLbRouteExtensionsListCall) Filter(filter string) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results. +func (c *ProjectsLocationsLbRouteExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// the server picks an appropriate default. +func (c *ProjectsLocationsLbRouteExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results that the server returns. +func (c *ProjectsLocationsLbRouteExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetIamPolicyCall { +func (c *ProjectsLocationsLbRouteExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10260,7 +10952,7 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) Fields(s ...googleapi.Field) * // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetIamPolicyCall { +func (c *ProjectsLocationsLbRouteExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -10268,21 +10960,21 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetIamPolicyCall { +func (c *ProjectsLocationsLbRouteExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10295,7 +10987,7 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbRouteExtensions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -10303,19 +10995,19 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkservices.projects.locations.lbRouteExtensions.list" call. +// Exactly one of *ListLbRouteExtensionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListLbRouteExtensionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLbRouteExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbRouteExtensionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10334,7 +11026,7 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ListLbRouteExtensionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10346,31 +11038,46 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:getIamPolicy", + // "description": "Lists `LbRouteExtension` resources in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.meshes.getIamPolicy", + // "id": "networkservices.projects.locations.lbRouteExtensions.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "filter": { + // "description": "Optional. Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", // "format": "int32", // "location": "query", // "type": "integer" // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "pageToken": { + // "description": "Optional. A token identifying a page of results that the server returns.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the `LbRouteExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+parent}/lbRouteExtensions", // "response": { - // "$ref": "Policy" + // "$ref": "ListLbRouteExtensionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10379,112 +11086,141 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOptio } -// method id "networkservices.projects.locations.meshes.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLbRouteExtensionsListCall) Pages(ctx context.Context, f func(*ListLbRouteExtensionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsMeshesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "networkservices.projects.locations.lbRouteExtensions.patch": + +type ProjectsLocationsLbRouteExtensionsPatchCall struct { + s *Service + name string + lbrouteextension *LbRouteExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Meshes in a given project and location. +// Patch: Updates the parameters of the specified `LbRouteExtension` +// resource. // -// - parent: The project and location from which the Meshes should be -// listed, specified in the format `projects/*/locations/global`. -func (r *ProjectsLocationsMeshesService) List(parent string) *ProjectsLocationsMeshesListCall { - c := &ProjectsLocationsMeshesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Identifier. Name of the `LbRouteExtension` resource in the +// following format: +// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route +// _extension}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Patch(name string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsPatchCall { + c := &ProjectsLocationsLbRouteExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.lbrouteextension = lbrouteextension return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// Meshes to return per call. -func (c *ProjectsLocationsMeshesListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsPatchCall { + c.urlParams_.Set("requestId", requestId) return c } -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListMeshesResponse` Indicates that this is a -// continuation of a prior `ListMeshes` call, and that the system should -// return the next page of data. -func (c *ProjectsLocationsMeshesListCall) PageToken(pageToken string) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": Required. Used +// to specify the fields to be overwritten in the `LbRouteExtension` +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field is +// overwritten if it is in the mask. If the user does not specify a +// mask, then all fields are overwritten. +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbRouteExtensionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesListCall { +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsMeshesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesListCall) Context(ctx context.Context) *ProjectsLocationsMeshesListCall { +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesListCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.list" call. -// Exactly one of *ListMeshesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListMeshesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*ListMeshesResponse, error) { +// Do executes the "networkservices.projects.locations.lbRouteExtensions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10503,7 +11239,7 @@ func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*Lis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListMeshesResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10515,36 +11251,39 @@ func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists Meshes in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.meshes.list", + // "description": "Updates the parameters of the specified `LbRouteExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.lbRouteExtensions.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of Meshes to return per call.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "name": { + // "description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + // "required": true, + // "type": "string" // }, - // "pageToken": { - // "description": "The value returned by the last `ListMeshesResponse` Indicates that this is a continuation of a prior `ListMeshes` call, and that the system should return the next page of data.", + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, + // "updateMask": { + // "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "format": "google-fieldmask", + // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/meshes", + // "path": "v1/{+name}", + // "request": { + // "$ref": "LbRouteExtension" + // }, // "response": { - // "$ref": "ListMeshesResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10553,64 +11292,58 @@ func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*Lis } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsMeshesListCall) Pages(ctx context.Context, f func(*ListMeshesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "networkservices.projects.locations.meshes.patch": +// method id "networkservices.projects.locations.lbTrafficExtensions.create": -type ProjectsLocationsMeshesPatchCall struct { - s *Service - name string - mesh *Mesh - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbTrafficExtensionsCreateCall struct { + s *Service + parent string + lbtrafficextension *LbTrafficExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single Mesh. +// Create: Creates a new `LbTrafficExtension` resource in a given +// project and location. // -// - name: Name of the Mesh resource. It matches pattern -// `projects/*/locations/global/meshes/`. -func (r *ProjectsLocationsMeshesService) Patch(name string, mesh *Mesh) *ProjectsLocationsMeshesPatchCall { - c := &ProjectsLocationsMeshesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.mesh = mesh +// - parent: The parent resource of the `LbTrafficExtension` resource. +// Must be in the format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Create(parent string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsCreateCall { + c := &ProjectsLocationsLbTrafficExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.lbtrafficextension = lbtrafficextension return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is -// used to specify the fields to be overwritten in the Mesh resource by -// the update. The fields specified in the update_mask are relative to -// the resource, not the full request. A field will be overwritten if it -// is in the mask. If the user does not provide a mask then all fields -// will be overwritten. -func (c *ProjectsLocationsMeshesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMeshesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// LbTrafficExtensionId sets the optional parameter +// "lbTrafficExtensionId": Required. User-provided ID of the +// `LbTrafficExtension` resource to be created. +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) LbTrafficExtensionId(lbTrafficExtensionId string) *ProjectsLocationsLbTrafficExtensionsCreateCall { + c.urlParams_.Set("lbTrafficExtensionId", lbTrafficExtensionId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesPatchCall { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10618,21 +11351,21 @@ func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *Project // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesPatchCall) Context(ctx context.Context) *ProjectsLocationsMeshesPatchCall { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesPatchCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10640,34 +11373,34 @@ func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbTrafficExtensions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.patch" call. +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.create" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10698,31 +11431,35 @@ func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Updates the parameters of a single Mesh.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", - // "httpMethod": "PATCH", - // "id": "networkservices.projects.locations.meshes.patch", + // "description": "Creates a new `LbTrafficExtension` resource in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.lbTrafficExtensions.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the Mesh resource. It matches pattern `projects/*/locations/global/meshes/`.", + // "lbTrafficExtensionId": { + // "description": "Required. User-provided ID of the `LbTrafficExtension` resource to be created.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, - // "updateMask": { - // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Mesh resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", - // "format": "google-fieldmask", + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/lbTrafficExtensions", // "request": { - // "$ref": "Mesh" + // "$ref": "LbTrafficExtension" // }, // "response": { // "$ref": "Operation" @@ -10734,36 +11471,49 @@ func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Op } -// method id "networkservices.projects.locations.meshes.setIamPolicy": +// method id "networkservices.projects.locations.lbTrafficExtensions.delete": -type ProjectsLocationsMeshesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbTrafficExtensionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Delete: Deletes the specified `LbTrafficExtension` resource. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsMeshesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMeshesSetIamPolicyCall { - c := &ProjectsLocationsMeshesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the `LbTrafficExtension` resource to delete. Must +// be in the format +// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_tra +// ffic_extension}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Delete(name string) *ProjectsLocationsLbTrafficExtensionsDeleteCall { + c := &ProjectsLocationsLbTrafficExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes after the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesSetIamPolicyCall { +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10771,21 +11521,21 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) Fields(s ...googleapi.Field) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesSetIamPolicyCall { +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10793,34 +11543,29 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10839,7 +11584,7 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10851,28 +11596,30 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.meshes.setIamPolicy", + // "description": "Deletes the specified `LbTrafficExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.lbTrafficExtensions.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10881,96 +11628,98 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOptio } -// method id "networkservices.projects.locations.meshes.testIamPermissions": +// method id "networkservices.projects.locations.lbTrafficExtensions.get": -type ProjectsLocationsMeshesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbTrafficExtensionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Get: Gets details of the specified `LbTrafficExtension` resource. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsMeshesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMeshesTestIamPermissionsCall { - c := &ProjectsLocationsMeshesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: A name of the `LbTrafficExtension` resource to get. Must be +// in the format +// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_tra +// ffic_extension}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Get(name string) *ProjectsLocationsLbTrafficExtensionsGetCall { + c := &ProjectsLocationsLbTrafficExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesTestIamPermissionsCall { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMeshesTestIamPermissionsCall { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.get" call. +// Exactly one of *LbTrafficExtension or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *LbTrafficExtension.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbTrafficExtension, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10989,7 +11738,7 @@ func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &LbTrafficExtension{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11001,28 +11750,25 @@ func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.meshes.testIamPermissions", + // "description": "Gets details of the specified `LbTrafficExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.lbTrafficExtensions.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "LbTrafficExtension" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11031,97 +11777,126 @@ func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.Cal } -// method id "networkservices.projects.locations.operations.cancel": +// method id "networkservices.projects.locations.lbTrafficExtensions.list": -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbTrafficExtensionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// List: Lists `LbTrafficExtension` resources in a given project and +// location. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest +// - parent: The project and location from which the +// `LbTrafficExtension` resources are listed, specified in the +// following format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) List(parent string) *ProjectsLocationsLbTrafficExtensionsListCall { + c := &ProjectsLocationsLbTrafficExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Filter(filter string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// the server picks an appropriate default. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results that the server returns. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbTrafficExtensions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.list" call. +// Exactly one of *ListLbTrafficExtensionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListLbTrafficExtensionsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbTrafficExtensionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11140,7 +11915,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &ListLbTrafficExtensionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11152,28 +11927,46 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.operations.cancel", + // "description": "Lists `LbTrafficExtension` resources in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.lbTrafficExtensions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "filter": { + // "description": "Optional. Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results that the server returns.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the `LbTrafficExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", - // "request": { - // "$ref": "CancelOperationRequest" - // }, + // "path": "v1/{+parent}/lbTrafficExtensions", // "response": { - // "$ref": "Empty" + // "$ref": "ListLbTrafficExtensionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11182,32 +11975,84 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "networkservices.projects.locations.operations.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Pages(ctx context.Context, f func(*ListLbTrafficExtensionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "networkservices.projects.locations.lbTrafficExtensions.patch": + +type ProjectsLocationsLbTrafficExtensionsPatchCall struct { + s *Service + name string + lbtrafficextension *LbTrafficExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. +// Patch: Updates the parameters of the specified `LbTrafficExtension` +// resource. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. Name of the `LbTrafficExtension` resource in the +// following format: +// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_tra +// ffic_extension}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Patch(name string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsPatchCall { + c := &ProjectsLocationsLbTrafficExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.lbtrafficextension = lbtrafficextension + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Used +// to specify the fields to be overwritten in the `LbTrafficExtension` +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field is +// overwritten if it is in the mask. If the user does not specify a +// mask, then all fields are overwritten. +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbTrafficExtensionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11215,21 +12060,21 @@ func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11237,11 +12082,16 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -11252,14 +12102,14 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11278,7 +12128,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11290,25 +12140,39 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "networkservices.projects.locations.operations.delete", + // "description": "Updates the parameters of the specified `LbTrafficExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.lbTrafficExtensions.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "LbTrafficExtension" + // }, // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11317,97 +12181,2801 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "networkservices.projects.locations.operations.get": +// method id "networkservices.projects.locations.meshes.create": -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMeshesCreateCall struct { + s *Service + parent string + mesh *Mesh + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Create: Creates a new Mesh in a given project and location. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource of the Mesh. Must be in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsMeshesService) Create(parent string, mesh *Mesh) *ProjectsLocationsMeshesCreateCall { + c := &ProjectsLocationsMeshesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.mesh = mesh + return c +} + +// MeshId sets the optional parameter "meshId": Required. Short name of +// the Mesh resource to be created. +func (c *ProjectsLocationsMeshesCreateCall) MeshId(meshId string) *ProjectsLocationsMeshesCreateCall { + c.urlParams_.Set("meshId", meshId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesCreateCall) Context(ctx context.Context) *ProjectsLocationsMeshesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Mesh in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.meshes.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "meshId": { + // "description": "Required. Short name of the Mesh resource to be created.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/meshes", + // "request": { + // "$ref": "Mesh" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.delete": + +type ProjectsLocationsMeshesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Mesh. +// +// - name: A name of the Mesh to delete. Must be in the format +// `projects/*/locations/global/meshes/*`. +func (r *ProjectsLocationsMeshesService) Delete(name string) *ProjectsLocationsMeshesDeleteCall { + c := &ProjectsLocationsMeshesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMeshesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Mesh.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.meshes.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.get": + +type ProjectsLocationsMeshesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Mesh. +// +// - name: A name of the Mesh to get. Must be in the format +// `projects/*/locations/global/meshes/*`. +func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMeshesGetCall { + c := &ProjectsLocationsMeshesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.get" call. +// Exactly one of *Mesh or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Mesh.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Mesh{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Mesh.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.meshes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Mesh" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.getIamPolicy": + +type ProjectsLocationsMeshesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsMeshesService) GetIamPolicy(resource string) *ProjectsLocationsMeshesGetIamPolicyCall { + c := &ProjectsLocationsMeshesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsMeshesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMeshesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.meshes.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.list": + +type ProjectsLocationsMeshesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Meshes in a given project and location. +// +// - parent: The project and location from which the Meshes should be +// listed, specified in the format `projects/*/locations/global`. +func (r *ProjectsLocationsMeshesService) List(parent string) *ProjectsLocationsMeshesListCall { + c := &ProjectsLocationsMeshesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Meshes to return per call. +func (c *ProjectsLocationsMeshesListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListMeshesResponse` Indicates that this is a +// continuation of a prior `ListMeshes` call, and that the system should +// return the next page of data. +func (c *ProjectsLocationsMeshesListCall) PageToken(pageToken string) *ProjectsLocationsMeshesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsMeshesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesListCall) Context(ctx context.Context) *ProjectsLocationsMeshesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.list" call. +// Exactly one of *ListMeshesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListMeshesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*ListMeshesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListMeshesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Meshes in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.meshes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Meshes to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListMeshesResponse` Indicates that this is a continuation of a prior `ListMeshes` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/meshes", + // "response": { + // "$ref": "ListMeshesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsMeshesListCall) Pages(ctx context.Context, f func(*ListMeshesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkservices.projects.locations.meshes.patch": + +type ProjectsLocationsMeshesPatchCall struct { + s *Service + name string + mesh *Mesh + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Mesh. +// +// - name: Name of the Mesh resource. It matches pattern +// `projects/*/locations/global/meshes/`. +func (r *ProjectsLocationsMeshesService) Patch(name string, mesh *Mesh) *ProjectsLocationsMeshesPatchCall { + c := &ProjectsLocationsMeshesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.mesh = mesh + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Mesh resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field will be overwritten if it +// is in the mask. If the user does not provide a mask then all fields +// will be overwritten. +func (c *ProjectsLocationsMeshesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMeshesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesPatchCall) Context(ctx context.Context) *ProjectsLocationsMeshesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Mesh.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.meshes.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the Mesh resource. It matches pattern `projects/*/locations/global/meshes/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Mesh resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Mesh" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.setIamPolicy": + +type ProjectsLocationsMeshesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsMeshesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMeshesSetIamPolicyCall { + c := &ProjectsLocationsMeshesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.meshes.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.testIamPermissions": + +type ProjectsLocationsMeshesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsMeshesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMeshesTestIamPermissionsCall { + c := &ProjectsLocationsMeshesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMeshesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.meshes.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkservices.projects.locations.serviceBindings.create": + +type ProjectsLocationsServiceBindingsCreateCall struct { + s *Service + parent string + servicebinding *ServiceBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new ServiceBinding in a given project and location. +// +// - parent: The parent resource of the ServiceBinding. Must be in the +// format `projects/*/locations/global`. +func (r *ProjectsLocationsServiceBindingsService) Create(parent string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsCreateCall { + c := &ProjectsLocationsServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.servicebinding = servicebinding + return c +} + +// ServiceBindingId sets the optional parameter "serviceBindingId": +// Required. Short name of the ServiceBinding resource to be created. +func (c *ProjectsLocationsServiceBindingsCreateCall) ServiceBindingId(serviceBindingId string) *ProjectsLocationsServiceBindingsCreateCall { + c.urlParams_.Set("serviceBindingId", serviceBindingId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicebinding) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new ServiceBinding in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.serviceBindings.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "serviceBindingId": { + // "description": "Required. Short name of the ServiceBinding resource to be created.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serviceBindings", + // "request": { + // "$ref": "ServiceBinding" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceBindings.delete": + +type ProjectsLocationsServiceBindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single ServiceBinding. +// +// - name: A name of the ServiceBinding to delete. Must be in the format +// `projects/*/locations/global/serviceBindings/*`. +func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsLocationsServiceBindingsDeleteCall { + c := &ProjectsLocationsServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single ServiceBinding.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.serviceBindings.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceBindings.get": + +type ProjectsLocationsServiceBindingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ServiceBinding. +// +// - name: A name of the ServiceBinding to get. Must be in the format +// `projects/*/locations/global/serviceBindings/*`. +func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLocationsServiceBindingsGetCall { + c := &ProjectsLocationsServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.get" call. +// Exactly one of *ServiceBinding or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ServiceBinding.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*ServiceBinding, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ServiceBinding{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single ServiceBinding.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.serviceBindings.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ServiceBinding" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceBindings.getIamPolicy": + +type ProjectsLocationsServiceBindingsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceBindingsService) GetIamPolicy(resource string) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c := &ProjectsLocationsServiceBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.serviceBindings.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceBindings.list": + +type ProjectsLocationsServiceBindingsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ServiceBinding in a given project and location. +// +// - parent: The project and location from which the ServiceBindings +// should be listed, specified in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsServiceBindingsService) List(parent string) *ProjectsLocationsServiceBindingsListCall { + c := &ProjectsLocationsServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// ServiceBindings to return per call. +func (c *ProjectsLocationsServiceBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceBindingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListServiceBindingsResponse` Indicates that this is a +// continuation of a prior `ListRouters` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) *ProjectsLocationsServiceBindingsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsListCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.list" call. +// Exactly one of *ListServiceBindingsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListServiceBindingsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*ListServiceBindingsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListServiceBindingsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists ServiceBinding in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.serviceBindings.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of ServiceBindings to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListServiceBindingsResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serviceBindings", + // "response": { + // "$ref": "ListServiceBindingsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f func(*ListServiceBindingsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkservices.projects.locations.serviceBindings.setIamPolicy": + +type ProjectsLocationsServiceBindingsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceBindingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceBindingsSetIamPolicyCall { + c := &ProjectsLocationsServiceBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "networkservices.projects.locations.serviceBindings.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11426,7 +14994,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11438,25 +15006,28 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.operations.get", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11465,118 +15036,96 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "networkservices.projects.locations.operations.list": +// method id "networkservices.projects.locations.serviceBindings.testIamPermissions": -type ProjectsLocationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceBindingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { + c := &ProjectsLocationsServiceBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networkservices.projects.locations.serviceBindings.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11595,7 +15144,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11607,41 +15156,28 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.operations.list", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11650,60 +15186,43 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "networkservices.projects.locations.serviceBindings.create": +// method id "networkservices.projects.locations.serviceLbPolicies.create": -type ProjectsLocationsServiceBindingsCreateCall struct { - s *Service - parent string - servicebinding *ServiceBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceLbPoliciesCreateCall struct { + s *Service + parent string + servicelbpolicy *ServiceLbPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new ServiceBinding in a given project and location. +// Create: Creates a new ServiceLbPolicy in a given project and +// location. // -// - parent: The parent resource of the ServiceBinding. Must be in the -// format `projects/*/locations/global`. -func (r *ProjectsLocationsServiceBindingsService) Create(parent string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsCreateCall { - c := &ProjectsLocationsServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource of the ServiceLbPolicy. Must be in the +// format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsServiceLbPoliciesService) Create(parent string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesCreateCall { + c := &ProjectsLocationsServiceLbPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.servicebinding = servicebinding + c.servicelbpolicy = servicelbpolicy return c } -// ServiceBindingId sets the optional parameter "serviceBindingId": -// Required. Short name of the ServiceBinding resource to be created. -func (c *ProjectsLocationsServiceBindingsCreateCall) ServiceBindingId(serviceBindingId string) *ProjectsLocationsServiceBindingsCreateCall { - c.urlParams_.Set("serviceBindingId", serviceBindingId) +// ServiceLbPolicyId sets the optional parameter "serviceLbPolicyId": +// Required. Short name of the ServiceLbPolicy resource to be created. +// E.g. for resource name +// `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb +// _policy_name}`. the id is value of {service_lb_policy_name} +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) ServiceLbPolicyId(serviceLbPolicyId string) *ProjectsLocationsServiceLbPoliciesCreateCall { + c.urlParams_.Set("serviceLbPolicyId", serviceLbPolicyId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11711,21 +15230,21 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11733,14 +15252,14 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicebinding) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceLbPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11753,14 +15272,14 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.create" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.create" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11791,30 +15310,30 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Creates a new ServiceBinding in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "description": "Creates a new ServiceLbPolicy in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", // "httpMethod": "POST", - // "id": "networkservices.projects.locations.serviceBindings.create", + // "id": "networkservices.projects.locations.serviceLbPolicies.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/global`.", + // "description": "Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, - // "serviceBindingId": { - // "description": "Required. Short name of the ServiceBinding resource to be created.", + // "serviceLbPolicyId": { + // "description": "Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/serviceBindings", + // "path": "v1/{+parent}/serviceLbPolicies", // "request": { - // "$ref": "ServiceBinding" + // "$ref": "ServiceLbPolicy" // }, // "response": { // "$ref": "Operation" @@ -11826,9 +15345,9 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOp } -// method id "networkservices.projects.locations.serviceBindings.delete": +// method id "networkservices.projects.locations.serviceLbPolicies.delete": -type ProjectsLocationsServiceBindingsDeleteCall struct { +type ProjectsLocationsServiceLbPoliciesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11836,12 +15355,13 @@ type ProjectsLocationsServiceBindingsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single ServiceBinding. +// Delete: Deletes a single ServiceLbPolicy. // -// - name: A name of the ServiceBinding to delete. Must be in the format -// `projects/*/locations/global/serviceBindings/*`. -func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsLocationsServiceBindingsDeleteCall { - c := &ProjectsLocationsServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: A name of the ServiceLbPolicy to delete. Must be in the +// format +// `projects/{project}/locations/{location}/serviceLbPolicies/*`. +func (r *ProjectsLocationsServiceLbPoliciesService) Delete(name string) *ProjectsLocationsServiceLbPoliciesDeleteCall { + c := &ProjectsLocationsServiceLbPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11849,7 +15369,7 @@ func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11857,21 +15377,21 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11894,14 +15414,14 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.delete" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11932,18 +15452,18 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Deletes a single ServiceBinding.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "description": "Deletes a single ServiceLbPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", // "httpMethod": "DELETE", - // "id": "networkservices.projects.locations.serviceBindings.delete", + // "id": "networkservices.projects.locations.serviceLbPolicies.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "description": "Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } @@ -11959,9 +15479,9 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOp } -// method id "networkservices.projects.locations.serviceBindings.get": +// method id "networkservices.projects.locations.serviceLbPolicies.get": -type ProjectsLocationsServiceBindingsGetCall struct { +type ProjectsLocationsServiceLbPoliciesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11970,12 +15490,12 @@ type ProjectsLocationsServiceBindingsGetCall struct { header_ http.Header } -// Get: Gets details of a single ServiceBinding. +// Get: Gets details of a single ServiceLbPolicy. // -// - name: A name of the ServiceBinding to get. Must be in the format -// `projects/*/locations/global/serviceBindings/*`. -func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLocationsServiceBindingsGetCall { - c := &ProjectsLocationsServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: A name of the ServiceLbPolicy to get. Must be in the format +// `projects/{project}/locations/{location}/serviceLbPolicies/*`. +func (r *ProjectsLocationsServiceLbPoliciesService) Get(name string) *ProjectsLocationsServiceLbPoliciesGetCall { + c := &ProjectsLocationsServiceLbPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11983,7 +15503,7 @@ func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLoca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11993,7 +15513,7 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) * // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -12001,21 +15521,21 @@ func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetCall { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12041,14 +15561,14 @@ func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.get" call. -// Exactly one of *ServiceBinding or error will be non-nil. Any non-2xx +// Do executes the "networkservices.projects.locations.serviceLbPolicies.get" call. +// Exactly one of *ServiceLbPolicy or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *ServiceBinding.ServerResponse.Header or (if a response was returned +// *ServiceLbPolicy.ServerResponse.Header or (if a response was returned // at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*ServiceBinding, error) { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServiceLbPolicy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12067,7 +15587,7 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ServiceBinding{ + ret := &ServiceLbPolicy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12079,25 +15599,25 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets details of a single ServiceBinding.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "description": "Gets details of a single ServiceLbPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.serviceBindings.get", + // "id": "networkservices.projects.locations.serviceLbPolicies.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "description": "Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "ServiceBinding" + // "$ref": "ServiceLbPolicy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12106,9 +15626,9 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOptio } -// method id "networkservices.projects.locations.serviceBindings.getIamPolicy": +// method id "networkservices.projects.locations.serviceLbPolicies.getIamPolicy": -type ProjectsLocationsServiceBindingsGetIamPolicyCall struct { +type ProjectsLocationsServiceLbPoliciesGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -12125,8 +15645,8 @@ type ProjectsLocationsServiceBindingsGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceBindingsService) GetIamPolicy(resource string) *ProjectsLocationsServiceBindingsGetIamPolicyCall { - c := &ProjectsLocationsServiceBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceLbPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { + c := &ProjectsLocationsServiceLbPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -12144,7 +15664,7 @@ func (r *ProjectsLocationsServiceBindingsService) GetIamPolicy(resource string) // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceBindingsGetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -12152,7 +15672,7 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) OptionsRequestedPolic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12162,7 +15682,7 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Fields(s ...googleapi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -12170,21 +15690,21 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12210,14 +15730,14 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.getIamPolicy" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.getIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12249,9 +15769,9 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi. return ret, nil // { // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:getIamPolicy", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:getIamPolicy", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.serviceBindings.getIamPolicy", + // "id": "networkservices.projects.locations.serviceLbPolicies.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -12265,7 +15785,7 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi. // "resource": { // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } @@ -12281,9 +15801,9 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi. } -// method id "networkservices.projects.locations.serviceBindings.list": +// method id "networkservices.projects.locations.serviceLbPolicies.list": -type ProjectsLocationsServiceBindingsListCall struct { +type ProjectsLocationsServiceLbPoliciesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -12292,29 +15812,29 @@ type ProjectsLocationsServiceBindingsListCall struct { header_ http.Header } -// List: Lists ServiceBinding in a given project and location. +// List: Lists ServiceLbPolicies in a given project and location. // -// - parent: The project and location from which the ServiceBindings +// - parent: The project and location from which the ServiceLbPolicies // should be listed, specified in the format -// `projects/*/locations/global`. -func (r *ProjectsLocationsServiceBindingsService) List(parent string) *ProjectsLocationsServiceBindingsListCall { - c := &ProjectsLocationsServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsServiceLbPoliciesService) List(parent string) *ProjectsLocationsServiceLbPoliciesListCall { + c := &ProjectsLocationsServiceLbPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// ServiceBindings to return per call. -func (c *ProjectsLocationsServiceBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceBindingsListCall { +// ServiceLbPolicies to return per call. +func (c *ProjectsLocationsServiceLbPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceLbPoliciesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListServiceBindingsResponse` Indicates that this is a +// by the last `ListServiceLbPoliciesResponse` Indicates that this is a // continuation of a prior `ListRouters` call, and that the system // should return the next page of data. -func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) *ProjectsLocationsServiceBindingsListCall { +func (c *ProjectsLocationsServiceLbPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServiceLbPoliciesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -12322,7 +15842,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12332,7 +15852,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsListCall { +func (c *ProjectsLocationsServiceLbPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesListCall { c.ifNoneMatch_ = entityTag return c } @@ -12340,21 +15860,21 @@ func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsListCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsListCall { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12367,7 +15887,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http. var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceLbPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12380,14 +15900,14 @@ func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.list" call. -// Exactly one of *ListServiceBindingsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListServiceBindingsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networkservices.projects.locations.serviceLbPolicies.list" call. +// Exactly one of *ListServiceLbPoliciesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListServiceLbPoliciesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*ListServiceBindingsResponse, error) { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServiceLbPoliciesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12406,7 +15926,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListServiceBindingsResponse{ + ret := &ListServiceLbPoliciesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12418,36 +15938,36 @@ func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists ServiceBinding in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "description": "Lists ServiceLbPolicies in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.serviceBindings.list", + // "id": "networkservices.projects.locations.serviceLbPolicies.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of ServiceBindings to return per call.", + // "description": "Maximum number of ServiceLbPolicies to return per call.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListServiceBindingsResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", + // "description": "The value returned by the last `ListServiceLbPoliciesResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/global`.", + // "description": "Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/serviceBindings", + // "path": "v1/{+parent}/serviceLbPolicies", // "response": { - // "$ref": "ListServiceBindingsResponse" + // "$ref": "ListServiceLbPoliciesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12459,7 +15979,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOpti // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f func(*ListServiceBindingsResponse) error) error { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Pages(ctx context.Context, f func(*ListServiceLbPoliciesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -12477,9 +15997,170 @@ func (c *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f } } -// method id "networkservices.projects.locations.serviceBindings.setIamPolicy": +// method id "networkservices.projects.locations.serviceLbPolicies.patch": -type ProjectsLocationsServiceBindingsSetIamPolicyCall struct { +type ProjectsLocationsServiceLbPoliciesPatchCall struct { + s *Service + name string + servicelbpolicy *ServiceLbPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single ServiceLbPolicy. +// +// - name: Name of the ServiceLbPolicy resource. It matches pattern +// `projects/{project}/locations/{location}/serviceLbPolicies/{service_ +// lb_policy_name}`. +func (r *ProjectsLocationsServiceLbPoliciesService) Patch(name string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesPatchCall { + c := &ProjectsLocationsServiceLbPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.servicelbpolicy = servicelbpolicy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the ServiceLbPolicy +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. If the user does not provide a mask +// then all fields will be overwritten. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceLbPoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceLbPolicies.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single ServiceLbPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.serviceLbPolicies.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "ServiceLbPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceLbPolicies.setIamPolicy": + +type ProjectsLocationsServiceLbPoliciesSetIamPolicyCall struct { s *Service resource string setiampolicyrequest *SetIamPolicyRequest @@ -12496,8 +16177,8 @@ type ProjectsLocationsServiceBindingsSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceBindingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceBindingsSetIamPolicyCall { - c := &ProjectsLocationsServiceBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceLbPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall { + c := &ProjectsLocationsServiceLbPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.setiampolicyrequest = setiampolicyrequest return c @@ -12506,7 +16187,7 @@ func (r *ProjectsLocationsServiceBindingsService) SetIamPolicy(resource string, // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsSetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12514,21 +16195,21 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsSetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12556,14 +16237,14 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.setIamPolicy" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.setIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12595,9 +16276,9 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi. return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:setIamPolicy", // "httpMethod": "POST", - // "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", + // "id": "networkservices.projects.locations.serviceLbPolicies.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -12605,7 +16286,7 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi. // "resource": { // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } @@ -12624,9 +16305,9 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi. } -// method id "networkservices.projects.locations.serviceBindings.testIamPermissions": +// method id "networkservices.projects.locations.serviceLbPolicies.testIamPermissions": -type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct { +type ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall struct { s *Service resource string testiampermissionsrequest *TestIamPermissionsRequest @@ -12646,8 +16327,8 @@ type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct { // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceBindingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { - c := &ProjectsLocationsServiceBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceLbPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall { + c := &ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.testiampermissionsrequest = testiampermissionsrequest return c @@ -12656,7 +16337,7 @@ func (r *ProjectsLocationsServiceBindingsService) TestIamPermissions(resource st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12664,21 +16345,21 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12706,14 +16387,14 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.testIamPermissions" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.testIamPermissions" call. // Exactly one of *TestIamPermissionsResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *TestIamPermissionsResponse.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12745,9 +16426,9 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...goog return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:testIamPermissions", // "httpMethod": "POST", - // "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", + // "id": "networkservices.projects.locations.serviceLbPolicies.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -12755,7 +16436,7 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...goog // "resource": { // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index c160b52e65a..b3aa443b060 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -2483,7 +2483,7 @@ } } }, - "revision": "20240125", + "revision": "20240207", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2697,7 +2697,7 @@ "id": "ExtensionChainExtension", "properties": { "authority": { - "description": "Required. The `:authority` header in the gRPC request sent from Envoy to the extension service.", + "description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service.", "type": "string" }, "failOpen": { @@ -2760,7 +2760,7 @@ "type": "object" }, "Gateway": { - "description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 30", + "description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 32", "id": "Gateway", "properties": { "addresses": { diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 1a30222e1d7..4d17b463f97 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -779,7 +779,7 @@ func (s *ExtensionChain) MarshalJSON() ([]byte, error) { // ExtensionChainExtension: A single extension in the chain to execute // for the matching request. type ExtensionChainExtension struct { - // Authority: Required. The `:authority` header in the gRPC request sent + // Authority: Optional. The `:authority` header in the gRPC request sent // from Envoy to the extension service. Authority string `json:"authority,omitempty"` @@ -900,7 +900,7 @@ func (s *ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) { // a load balancer. It captures the ip:port over which the services are // exposed by the proxy, along with any policy configurations. Routes // have reference to to Gateways to dictate how requests should be -// routed by this Gateway. Next id: 30 +// routed by this Gateway. Next id: 32 type Gateway struct { // Addresses: Optional. Zero or one IPv4 or IPv6 address on which the // Gateway will receive the traffic. When no address is provided, an IP diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index 507edd28fa5..447d2e9f9b2 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -2200,7 +2200,7 @@ } } }, - "revision": "20240205", + "revision": "20240216", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -5223,7 +5223,9 @@ "UNABLE_TO_VERIFY_DEFINERS", "SUBSCRIPTION_CALCULATION_STATUS", "PG_SUBSCRIPTION_COUNT", - "PG_SYNC_PARALLEL_LEVEL" + "PG_SYNC_PARALLEL_LEVEL", + "INSUFFICIENT_DISK_SIZE", + "INSUFFICIENT_MACHINE_TIER" ], "enumDescriptions": [ "", @@ -5268,7 +5270,9 @@ "Unable to verify definers on the source for MySQL.", "If a time out occurs while the subscription counts are calculated, then this value is set to 1. Otherwise, this value is set to 2.", "Count of subscriptions needed to sync source data for PostgreSQL database.", - "Final parallel level that is used to do migration." + "Final parallel level that is used to do migration.", + "The disk size of the replica instance is smaller than the data size of the source instance.", + "The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB." ], "type": "string" } diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 8cf1ce79f65..e80983a70c5 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -4385,6 +4385,11 @@ type SqlExternalSyncSettingError struct { // source data for PostgreSQL database. // "PG_SYNC_PARALLEL_LEVEL" - Final parallel level that is used to do // migration. + // "INSUFFICIENT_DISK_SIZE" - The disk size of the replica instance is + // smaller than the data size of the source instance. + // "INSUFFICIENT_MACHINE_TIER" - The data size of the source instance + // is greater than 1 TB, the number of cores of the replica instance is + // less than 8, and the memory of the replica is less than 32 GB. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index af9071f1943..45524f0a693 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -2200,7 +2200,7 @@ } } }, - "revision": "20240205", + "revision": "20240216", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -5224,7 +5224,9 @@ "UNABLE_TO_VERIFY_DEFINERS", "SUBSCRIPTION_CALCULATION_STATUS", "PG_SUBSCRIPTION_COUNT", - "PG_SYNC_PARALLEL_LEVEL" + "PG_SYNC_PARALLEL_LEVEL", + "INSUFFICIENT_DISK_SIZE", + "INSUFFICIENT_MACHINE_TIER" ], "enumDescriptions": [ "", @@ -5269,7 +5271,9 @@ "Unable to verify definers on the source for MySQL.", "If a time out occurs while the subscription counts are calculated, then this value is set to 1. Otherwise, this value is set to 2.", "Count of subscriptions needed to sync source data for PostgreSQL database.", - "Final parallel level that is used to do migration." + "Final parallel level that is used to do migration.", + "The disk size of the replica instance is smaller than the data size of the source instance.", + "The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB." ], "type": "string" } diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index 1c7d16da35e..707aff3929d 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -4389,6 +4389,11 @@ type SqlExternalSyncSettingError struct { // source data for PostgreSQL database. // "PG_SYNC_PARALLEL_LEVEL" - Final parallel level that is used to do // migration. + // "INSUFFICIENT_DISK_SIZE" - The disk size of the replica instance is + // smaller than the data size of the source instance. + // "INSUFFICIENT_MACHINE_TIER" - The data size of the source instance + // is greater than 1 TB, the number of cores of the replica instance is + // less than 8, and the memory of the replica is less than 32 GB. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to