From 2b846e55cfdffb0e5e100f5d75f06691fdb7d845 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 13 Sep 2023 00:22:15 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2159) --- .../v1/accesscontextmanager-api.json | 70 +- .../v1/accesscontextmanager-gen.go | 136 + admob/v1beta/admob-api.json | 4 +- admob/v1beta/admob-gen.go | 2 +- aiplatform/v1/aiplatform-api.json | 67 +- aiplatform/v1/aiplatform-gen.go | 146 +- aiplatform/v1beta1/aiplatform-api.json | 229 +- aiplatform/v1beta1/aiplatform-gen.go | 781 +++- api-list.json | 15 + assuredworkloads/v1/assuredworkloads-api.json | 140 +- assuredworkloads/v1/assuredworkloads-gen.go | 415 ++ cloudasset/v1/cloudasset-api.json | 70 +- cloudasset/v1/cloudasset-gen.go | 138 + cloudasset/v1beta1/cloudasset-api.json | 70 +- cloudasset/v1beta1/cloudasset-gen.go | 138 + cloudasset/v1p1beta1/cloudasset-api.json | 70 +- cloudasset/v1p1beta1/cloudasset-gen.go | 138 + cloudasset/v1p5beta1/cloudasset-api.json | 70 +- cloudasset/v1p5beta1/cloudasset-gen.go | 138 + cloudasset/v1p7beta1/cloudasset-api.json | 70 +- cloudasset/v1p7beta1/cloudasset-gen.go | 138 + cloudbuild/v1/cloudbuild-api.json | 24 +- cloudbuild/v1/cloudbuild-gen.go | 40 +- cloudbuild/v2/cloudbuild-api.json | 145 +- cloudbuild/v2/cloudbuild-gen.go | 461 ++- clouddeploy/v1/clouddeploy-api.json | 100 +- clouddeploy/v1/clouddeploy-gen.go | 268 ++ .../v1alpha1/contactcenteraiplatform-api.json | 6 +- .../v1alpha1/contactcenteraiplatform-gen.go | 3 + metastore/v1/metastore-api.json | 7 +- metastore/v1/metastore-gen.go | 19 +- metastore/v1alpha/metastore-api.json | 7 +- metastore/v1alpha/metastore-gen.go | 19 +- metastore/v1beta/metastore-api.json | 7 +- metastore/v1beta/metastore-gen.go | 19 +- .../v1/networkmanagement-api.json | 176 +- networkmanagement/v1/networkmanagement-gen.go | 223 +- .../v1/rapidmigrationassessment-api.json | 1059 +++++ .../v1/rapidmigrationassessment-gen.go | 3450 +++++++++++++++++ .../v1/smartdevicemanagement-api.json | 36 +- .../v1/smartdevicemanagement-gen.go | 39 +- testing/v1/testing-api.json | 4 +- testing/v1/testing-gen.go | 2 +- 43 files changed, 8890 insertions(+), 269 deletions(-) create mode 100644 rapidmigrationassessment/v1/rapidmigrationassessment-api.json create mode 100644 rapidmigrationassessment/v1/rapidmigrationassessment-gen.go diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index 870691a8d86..548162eff8e 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1235,7 +1235,7 @@ } } }, - "revision": "20230903", + "revision": "20230910", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1543,6 +1543,13 @@ "type": "string" }, "type": "array" + }, + "vpcNetworkSources": { + "description": "The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.", + "items": { + "$ref": "VpcNetworkSource" + }, + "type": "array" } }, "type": "object" @@ -1648,6 +1655,27 @@ "Authorize access from all service accounts outside the perimeter." ], "type": "string" + }, + "sourceRestriction": { + "description": "Whether to enforce traffic restrictions based on `sources` field. If the `sources` fields is non-empty, then this field must be set to `SOURCE_RESTRICTION_ENABLED`.", + "enum": [ + "SOURCE_RESTRICTION_UNSPECIFIED", + "SOURCE_RESTRICTION_ENABLED", + "SOURCE_RESTRICTION_DISABLED" + ], + "enumDescriptions": [ + "Enforcement preference unspecified, will not enforce traffic restrictions based on `sources` in EgressFrom.", + "Enforcement preference enabled, traffic restrictions will be enforced based on `sources` in EgressFrom.", + "Enforcement preference disabled, will not enforce traffic restrictions based on `sources` in EgressFrom." + ], + "type": "string" + }, + "sources": { + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", + "items": { + "$ref": "EgressSource" + }, + "type": "array" } }, "type": "object" @@ -1667,6 +1695,17 @@ }, "type": "object" }, + "EgressSource": { + "description": "The source that EgressPolicy authorizes access from inside the ServicePerimeter to somewhere outside the ServicePerimeter boundaries.", + "id": "EgressSource", + "properties": { + "accessLevel": { + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", + "type": "string" + } + }, + "type": "object" + }, "EgressTo": { "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "EgressTo", @@ -2337,6 +2376,35 @@ } }, "type": "object" + }, + "VpcNetworkSource": { + "description": "The originating network source in Google Cloud.", + "id": "VpcNetworkSource", + "properties": { + "vpcSubnetwork": { + "$ref": "VpcSubNetwork", + "description": "Sub-segment ranges of a VPC network." + } + }, + "type": "object" + }, + "VpcSubNetwork": { + "description": "Sub-segment ranges inside of a VPC Network.", + "id": "VpcSubNetwork", + "properties": { + "network": { + "description": "Required. Network name. If the network is not part of the organization, the `compute.network.get` permission must be granted to the caller. Format: `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWORK_NAME}` Example: `//compute.googleapis.com/projects/my-project/global/networks/network-1`", + "type": "string" + }, + "vpcIpSubnetworks": { + "description": "CIDR block IP subnetwork specification. The IP address must be an IPv4 address and can be a public or private IP address. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, \"192.0.2.0/24\" is accepted but \"192.0.2.1/24\" is not. If empty, all IP addresses are allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index 64a305800ae..377a3bdf45a 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -814,6 +814,11 @@ type Condition struct { // "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME" RequiredAccessLevels []string `json:"requiredAccessLevels,omitempty"` + // VpcNetworkSources: The request must originate from one of the + // provided VPC networks in Google Cloud. Cannot specify this field + // together with `ip_subnetworks`. + VpcNetworkSources []*VpcNetworkSource `json:"vpcNetworkSources,omitempty"` + // ForceSendFields is a list of field names (e.g. "DevicePolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -972,6 +977,27 @@ type EgressFrom struct { // outside the perimeter. IdentityType string `json:"identityType,omitempty"` + // SourceRestriction: Whether to enforce traffic restrictions based on + // `sources` field. If the `sources` fields is non-empty, then this + // field must be set to `SOURCE_RESTRICTION_ENABLED`. + // + // Possible values: + // "SOURCE_RESTRICTION_UNSPECIFIED" - Enforcement preference + // unspecified, will not enforce traffic restrictions based on `sources` + // in EgressFrom. + // "SOURCE_RESTRICTION_ENABLED" - Enforcement preference enabled, + // traffic restrictions will be enforced based on `sources` in + // EgressFrom. + // "SOURCE_RESTRICTION_DISABLED" - Enforcement preference disabled, + // will not enforce traffic restrictions based on `sources` in + // EgressFrom. + SourceRestriction string `json:"sourceRestriction,omitempty"` + + // Sources: Sources that this EgressPolicy authorizes access from. If + // this field is not empty, then `source_restriction` must be set to + // `SOURCE_RESTRICTION_ENABLED`. + Sources []*EgressSource `json:"sources,omitempty"` + // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1040,6 +1066,45 @@ func (s *EgressPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// EgressSource: The source that EgressPolicy authorizes access from +// inside the ServicePerimeter to somewhere outside the ServicePerimeter +// boundaries. +type EgressSource struct { + // AccessLevel: An AccessLevel resource name that allows protected + // resources inside the ServicePerimeters to access outside the + // ServicePerimeter boundaries. AccessLevels listed must be in the same + // policy as this ServicePerimeter. Referencing a nonexistent + // AccessLevel will cause an error. If an AccessLevel name is not + // specified, only resources within the perimeter can be accessed + // through Google Cloud calls with request origins within the perimeter. + // Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a + // single `*` is specified for `access_level`, then all EgressSources + // will be allowed. + AccessLevel string `json:"accessLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessLevel") 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. "AccessLevel") 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 *EgressSource) MarshalJSON() ([]byte, error) { + type NoMethod EgressSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // EgressTo: Defines the conditions under which an EgressPolicy matches // a request. Conditions are based on information about the ApiOperation // intended to be performed on the `resources` specified. Note that if @@ -2451,6 +2516,77 @@ func (s *VpcAccessibleServices) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VpcNetworkSource: The originating network source in Google Cloud. +type VpcNetworkSource struct { + // VpcSubnetwork: Sub-segment ranges of a VPC network. + VpcSubnetwork *VpcSubNetwork `json:"vpcSubnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") 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. "VpcSubnetwork") 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 *VpcNetworkSource) MarshalJSON() ([]byte, error) { + type NoMethod VpcNetworkSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpcSubNetwork: Sub-segment ranges inside of a VPC Network. +type VpcSubNetwork struct { + // Network: Required. Network name. If the network is not part of the + // organization, the `compute.network.get` permission must be granted to + // the caller. Format: + // `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWO + // RK_NAME}` Example: + // `//compute.googleapis.com/projects/my-project/global/networks/network- + // 1` + Network string `json:"network,omitempty"` + + // VpcIpSubnetworks: CIDR block IP subnetwork specification. The IP + // address must be an IPv4 address and can be a public or private IP + // address. Note that for a CIDR IP address block, the specified IP + // address portion must be properly truncated (i.e. all the host bits + // must be zero) or the input is considered malformed. For example, + // "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. If empty, all + // IP addresses are allowed. + VpcIpSubnetworks []string `json:"vpcIpSubnetworks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") 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. "Network") 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 *VpcSubNetwork) MarshalJSON() ([]byte, error) { + type NoMethod VpcSubNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "accesscontextmanager.accessPolicies.create": type AccessPoliciesCreateCall struct { diff --git a/admob/v1beta/admob-api.json b/admob/v1beta/admob-api.json index 7314b817b94..dabc933513b 100644 --- a/admob/v1beta/admob-api.json +++ b/admob/v1beta/admob-api.json @@ -758,7 +758,7 @@ } } }, - "revision": "20230907", + "revision": "20230912", "rootUrl": "https://admob.googleapis.com/", "schemas": { "AdSource": { @@ -1412,7 +1412,7 @@ "type": "object" }, "MediationAbExperiment": { - "description": "The mediation A/B experiment. NEXT ID: 12", + "description": "The mediation A/B experiment.", "id": "MediationAbExperiment", "properties": { "controlMediationLines": { diff --git a/admob/v1beta/admob-gen.go b/admob/v1beta/admob-gen.go index d6b4c71c277..48504f16a83 100644 --- a/admob/v1beta/admob-gen.go +++ b/admob/v1beta/admob-gen.go @@ -1550,7 +1550,7 @@ func (s *LocalizationSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MediationAbExperiment: The mediation A/B experiment. NEXT ID: 12 +// MediationAbExperiment: The mediation A/B experiment. type MediationAbExperiment struct { // ControlMediationLines: Output only. The experiment mediation lines // for control. They are inherited from the parent mediation group. It diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 1c909739267..5121ca3fb86 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -3944,12 +3944,12 @@ ], "parameters": { "featureId": { - "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType/FeatureGroup.", + "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType .", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the EntityType or FeatureGroup to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "description": "Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+$", "required": true, @@ -3977,7 +3977,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`", + "description": "Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+$", "required": true, @@ -4002,7 +4002,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "description": "Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+$", "required": true, @@ -4038,7 +4038,7 @@ "type": "integer" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `feature_id` * `value_type` * `create_time` * `update_time`", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `feature_id` * `value_type` (Not supported for FeatureRegistry Feature) * `create_time` * `update_time`", "location": "query", "type": "string" }, @@ -4054,7 +4054,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "description": "Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+$", "required": true, @@ -12442,7 +12442,7 @@ } } }, - "revision": "20230812", + "revision": "20230908", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -13813,7 +13813,7 @@ "type": "object" }, "GoogleCloudAiplatformV1CreateFeatureRequest": { - "description": "Request message for FeaturestoreService.CreateFeature and FeatureRegistryService.CreateFeature.", + "description": "Request message for FeaturestoreService.CreateFeature.", "id": "GoogleCloudAiplatformV1CreateFeatureRequest", "properties": { "feature": { @@ -13821,11 +13821,11 @@ "description": "Required. The Feature to create." }, "featureId": { - "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType/FeatureGroup.", + "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType .", "type": "string" }, "parent": { - "description": "Required. The resource name of the EntityType or FeatureGroup to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "description": "Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", "type": "string" } }, @@ -16147,7 +16147,7 @@ "type": "string" }, "valueType": { - "description": "Required. Immutable. Type of Feature value.", + "description": "Immutable. Type of Feature value.", "enum": [ "VALUE_TYPE_UNSPECIFIED", "BOOL", @@ -17138,6 +17138,10 @@ "description": "Required. The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters.", "type": "string" }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1EncryptionSpec", + "description": "Immutable. Customer-managed encryption key spec for an Index. If set, this Index and all sub-resources of this Index will be secured by this key." + }, "etag": { "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", "type": "string" @@ -17156,7 +17160,7 @@ ], "enumDescriptions": [ "Should not be used.", - "BatchUpdate: user can call UpdateIndex with files on Cloud Storage of datapoints to update.", + "BatchUpdate: user can call UpdateIndex with files on Cloud Storage of Datapoints to update.", "StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update the Index and the updates will be applied in corresponding DeployedIndexes in nearly real-time." ], "type": "string" @@ -17211,7 +17215,7 @@ "type": "array" }, "restricts": { - "description": "Optional. List of Restrict of the datapoint, used to perform \"restricted searches\" where boolean rule are used to filter the subset of the database eligible for matching. See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering", + "description": "Optional. List of Restrict of the datapoint, used to perform \"restricted searches\" where boolean rule are used to filter the subset of the database eligible for matching. This uses categorical tokens. See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering", "items": { "$ref": "GoogleCloudAiplatformV1IndexDatapointRestriction" }, @@ -17236,21 +17240,21 @@ "id": "GoogleCloudAiplatformV1IndexDatapointRestriction", "properties": { "allowList": { - "description": "The attributes to allow in this namespace. eg: 'red'", + "description": "The attributes to allow in this namespace. e.g.: 'red'", "items": { "type": "string" }, "type": "array" }, "denyList": { - "description": "The attributes to deny in this namespace. eg: 'blue'", + "description": "The attributes to deny in this namespace. e.g.: 'blue'", "items": { "type": "string" }, "type": "array" }, "namespace": { - "description": "The namespace of this restriction. eg: color.", + "description": "The namespace of this restriction. e.g.: color.", "type": "string" } }, @@ -17287,6 +17291,10 @@ "description": "Optional. Deprecated: If true, expose the IndexEndpoint via private service connect. Only one of the fields, network or enable_private_service_connect, can be set.", "type": "boolean" }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1EncryptionSpec", + "description": "Immutable. Customer-managed encryption key spec for an IndexEndpoint. If set, this IndexEndpoint and all sub-resources of this IndexEndpoint will be secured by this key." + }, "etag": { "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", "type": "string" @@ -17693,7 +17701,7 @@ "type": "object" }, "GoogleCloudAiplatformV1ListFeaturesResponse": { - "description": "Response message for FeaturestoreService.ListFeatures. Response message for FeatureRegistryService.ListFeatures.", + "description": "Response message for FeaturestoreService.ListFeatures.", "id": "GoogleCloudAiplatformV1ListFeaturesResponse", "properties": { "features": { @@ -26190,6 +26198,13 @@ "description": "Required. The identifier of the client that is requesting the suggestion. If multiple SuggestTrialsRequests have the same `client_id`, the service will return the identical suggested Trial if the Trial is pending, and provide a new Trial if the last suggested Trial was completed.", "type": "string" }, + "contexts": { + "description": "Optional. This allows you to specify the \"context\" for a Trial; a context is a slice (a subspace) of the search space. Typical uses for contexts: 1) You are using Vizier to tune a server for best performance, but there's a strong weekly cycle. The context specifies the day-of-week. This allows Tuesday to generalize from Wednesday without assuming that everything is identical. 2) Imagine you're optimizing some medical treatment for people. As they walk in the door, you know certain facts about them (e.g. sex, weight, height, blood-pressure). Put that information in the context, and Vizier will adapt its suggestions to the patient. 3) You want to do a fair A/B test efficiently. Specify the \"A\" and \"B\" conditions as contexts, and Vizier will generalize between \"A\" and \"B\" conditions. If they are similar, this will allow Vizier to converge to the optimum faster than if \"A\" and \"B\" were separate Studies. NOTE: You can also enter contexts as REQUESTED Trials, e.g. via the CreateTrial() RPC; that's the asynchronous option where you don't need a close association between contexts and suggestions. NOTE: All the Parameters you set in a context MUST be defined in the Study. NOTE: You must supply 0 or $suggestion_count contexts. If you don't supply any contexts, Vizier will make suggestions from the full search space specified in the StudySpec; if you supply a full set of context, each suggestion will match the corresponding context. NOTE: A Context with no features set matches anything, and allows suggestions from the full search space. NOTE: Contexts MUST lie within the search space specified in the StudySpec. It's an error if they don't. NOTE: Contexts preferentially match ACTIVE then REQUESTED trials before new suggestions are generated. NOTE: Generation of suggestions involves a match between a Context and (optionally) a REQUESTED trial; if that match is not fully specified, a suggestion will be geneated in the merged subspace.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrialContext" + }, + "type": "array" + }, "suggestionCount": { "description": "Required. The number of suggestions requested. It must be positive.", "format": "int32", @@ -26997,6 +27012,24 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1TrialContext": { + "description": "Next ID: 3", + "id": "GoogleCloudAiplatformV1TrialContext", + "properties": { + "description": { + "description": "A human-readable field which can store a description of this context. This will become part of the resulting Trial's description field.", + "type": "string" + }, + "parameters": { + "description": "If/when a Trial is generated or selected from this Context, its Parameters will match any parameters specified here. (I.e. if this context specifies parameter name:'a' int_value:3, then a resulting Trial will have int_value:3 for its parameter named 'a'.) Note that we first attempt to match existing REQUESTED Trials with contexts, and if there are no matches, we generate suggestions in the subspace defined by the parameters specified here. NOTE: a Context without any Parameters matches the entire feasible search space.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrialParameter" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1TrialParameter": { "description": "A message representing a parameter to be tuned.", "id": "GoogleCloudAiplatformV1TrialParameter", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index 3f54a4705df..fa76b8772b9 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -3704,8 +3704,7 @@ func (s *GoogleCloudAiplatformV1CreateFeatureOperationMetadata) MarshalJSON() ([ } // GoogleCloudAiplatformV1CreateFeatureRequest: Request message for -// FeaturestoreService.CreateFeature and -// FeatureRegistryService.CreateFeature. +// FeaturestoreService.CreateFeature. type GoogleCloudAiplatformV1CreateFeatureRequest struct { // Feature: Required. The Feature to create. Feature *GoogleCloudAiplatformV1Feature `json:"feature,omitempty"` @@ -3714,15 +3713,13 @@ type GoogleCloudAiplatformV1CreateFeatureRequest struct { // the final component of the Feature's resource name. This value may be // up to 128 characters, and valid characters are `[a-z0-9_]`. The first // character cannot be a number. The value must be unique within an - // EntityType/FeatureGroup. + // EntityType . FeatureId string `json:"featureId,omitempty"` - // Parent: Required. The resource name of the EntityType or FeatureGroup - // to create a Feature. Format: + // Parent: Required. The resource name of the EntityType to create a + // Feature. Format: // `projects/{project}/locations/{location}/featurestores/{featurestore}/ // entityTypes/{entity_type}` - // `projects/{project}/locations/{location}/featureGroups/{feature_group} - // ` Parent string `json:"parent,omitempty"` // ForceSendFields is a list of field names (e.g. "Feature") to @@ -8013,7 +8010,7 @@ type GoogleCloudAiplatformV1Feature struct { // recently updated. UpdateTime string `json:"updateTime,omitempty"` - // ValueType: Required. Immutable. Type of Feature value. + // ValueType: Immutable. Type of Feature value. // // Possible values: // "VALUE_TYPE_UNSPECIFIED" - The value type is unspecified. @@ -9875,6 +9872,11 @@ type GoogleCloudAiplatformV1Index struct { // up to 128 characters long and can consist of any UTF-8 characters. DisplayName string `json:"displayName,omitempty"` + // EncryptionSpec: Immutable. Customer-managed encryption key spec for + // an Index. If set, this Index and all sub-resources of this Index will + // be secured by this key. + EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` + // Etag: Used to perform consistent read-modify-write updates. If not // set, a blind "overwrite" update happens. Etag string `json:"etag,omitempty"` @@ -9888,7 +9890,7 @@ type GoogleCloudAiplatformV1Index struct { // Possible values: // "INDEX_UPDATE_METHOD_UNSPECIFIED" - Should not be used. // "BATCH_UPDATE" - BatchUpdate: user can call UpdateIndex with files - // on Cloud Storage of datapoints to update. + // on Cloud Storage of Datapoints to update. // "STREAM_UPDATE" - StreamUpdate: user can call // UpsertDatapoints/DeleteDatapoints to update the Index and the updates // will be applied in corresponding DeployedIndexes in nearly real-time. @@ -9971,7 +9973,8 @@ type GoogleCloudAiplatformV1IndexDatapoint struct { // Restricts: Optional. List of Restrict of the datapoint, used to // perform "restricted searches" where boolean rule are used to filter - // the subset of the database eligible for matching. See: + // the subset of the database eligible for matching. This uses + // categorical tokens. See: // https://cloud.google.com/vertex-ai/docs/matching-engine/filtering Restricts []*GoogleCloudAiplatformV1IndexDatapointRestriction `json:"restricts,omitempty"` @@ -10055,13 +10058,13 @@ func (s *GoogleCloudAiplatformV1IndexDatapointCrowdingTag) MarshalJSON() ([]byte // datapoint which describe its attributes(tokens) from each of several // attribute categories(namespaces). type GoogleCloudAiplatformV1IndexDatapointRestriction struct { - // AllowList: The attributes to allow in this namespace. eg: 'red' + // AllowList: The attributes to allow in this namespace. e.g.: 'red' AllowList []string `json:"allowList,omitempty"` - // DenyList: The attributes to deny in this namespace. eg: 'blue' + // DenyList: The attributes to deny in this namespace. e.g.: 'blue' DenyList []string `json:"denyList,omitempty"` - // Namespace: The namespace of this restriction. eg: color. + // Namespace: The namespace of this restriction. e.g.: color. Namespace string `json:"namespace,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowList") to @@ -10110,6 +10113,11 @@ type GoogleCloudAiplatformV1IndexEndpoint struct { // fields, network or enable_private_service_connect, can be set. EnablePrivateServiceConnect bool `json:"enablePrivateServiceConnect,omitempty"` + // EncryptionSpec: Immutable. Customer-managed encryption key spec for + // an IndexEndpoint. If set, this IndexEndpoint and all sub-resources of + // this IndexEndpoint will be secured by this key. + EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` + // Etag: Used to perform consistent read-modify-write updates. If not // set, a blind "overwrite" update happens. Etag string `json:"etag,omitempty"` @@ -10941,8 +10949,7 @@ func (s *GoogleCloudAiplatformV1ListExecutionsResponse) MarshalJSON() ([]byte, e } // GoogleCloudAiplatformV1ListFeaturesResponse: Response message for -// FeaturestoreService.ListFeatures. Response message for -// FeatureRegistryService.ListFeatures. +// FeaturestoreService.ListFeatures. type GoogleCloudAiplatformV1ListFeaturesResponse struct { // Features: The Features matching the request. Features []*GoogleCloudAiplatformV1Feature `json:"features,omitempty"` @@ -27481,6 +27488,38 @@ type GoogleCloudAiplatformV1SuggestTrialsRequest struct { // Trial was completed. ClientId string `json:"clientId,omitempty"` + // Contexts: Optional. This allows you to specify the "context" for a + // Trial; a context is a slice (a subspace) of the search space. Typical + // uses for contexts: 1) You are using Vizier to tune a server for best + // performance, but there's a strong weekly cycle. The context specifies + // the day-of-week. This allows Tuesday to generalize from Wednesday + // without assuming that everything is identical. 2) Imagine you're + // optimizing some medical treatment for people. As they walk in the + // door, you know certain facts about them (e.g. sex, weight, height, + // blood-pressure). Put that information in the context, and Vizier will + // adapt its suggestions to the patient. 3) You want to do a fair A/B + // test efficiently. Specify the "A" and "B" conditions as contexts, and + // Vizier will generalize between "A" and "B" conditions. If they are + // similar, this will allow Vizier to converge to the optimum faster + // than if "A" and "B" were separate Studies. NOTE: You can also enter + // contexts as REQUESTED Trials, e.g. via the CreateTrial() RPC; that's + // the asynchronous option where you don't need a close association + // between contexts and suggestions. NOTE: All the Parameters you set in + // a context MUST be defined in the Study. NOTE: You must supply 0 or + // $suggestion_count contexts. If you don't supply any contexts, Vizier + // will make suggestions from the full search space specified in the + // StudySpec; if you supply a full set of context, each suggestion will + // match the corresponding context. NOTE: A Context with no features set + // matches anything, and allows suggestions from the full search space. + // NOTE: Contexts MUST lie within the search space specified in the + // StudySpec. It's an error if they don't. NOTE: Contexts preferentially + // match ACTIVE then REQUESTED trials before new suggestions are + // generated. NOTE: Generation of suggestions involves a match between a + // Context and (optionally) a REQUESTED trial; if that match is not + // fully specified, a suggestion will be geneated in the merged + // subspace. + Contexts []*GoogleCloudAiplatformV1TrialContext `json:"contexts,omitempty"` + // SuggestionCount: Required. The number of suggestions requested. It // must be positive. SuggestionCount int64 `json:"suggestionCount,omitempty"` @@ -28640,6 +28679,46 @@ func (s *GoogleCloudAiplatformV1Trial) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1TrialContext: Next ID: 3 +type GoogleCloudAiplatformV1TrialContext struct { + // Description: A human-readable field which can store a description of + // this context. This will become part of the resulting Trial's + // description field. + Description string `json:"description,omitempty"` + + // Parameters: If/when a Trial is generated or selected from this + // Context, its Parameters will match any parameters specified here. + // (I.e. if this context specifies parameter name:'a' int_value:3, then + // a resulting Trial will have int_value:3 for its parameter named 'a'.) + // Note that we first attempt to match existing REQUESTED Trials with + // contexts, and if there are no matches, we generate suggestions in the + // subspace defined by the parameters specified here. NOTE: a Context + // without any Parameters matches the entire feasible search space. + Parameters []*GoogleCloudAiplatformV1TrialParameter `json:"parameters,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleCloudAiplatformV1TrialContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrialContext + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1TrialParameter: A message representing a // parameter to be tuned. type GoogleCloudAiplatformV1TrialParameter struct { @@ -48724,12 +48803,10 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall struct { // Create: Creates a new Feature in a given EntityType. // -// - parent: The resource name of the EntityType or FeatureGroup to -// create a Feature. Format: +// - parent: The resource name of the EntityType to create a Feature. +// Format: // `projects/{project}/locations/{location}/featurestores/{featurestore -// }/entityTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_grou -// p}`. +// }/entityTypes/{entity_type}`. func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Create(parent string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -48741,7 +48818,7 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Create(parent // to use for the Feature, which will become the final component of the // Feature's resource name. This value may be up to 128 characters, and // valid characters are `[a-z0-9_]`. The first character cannot be a -// number. The value must be unique within an EntityType/FeatureGroup. +// number. The value must be unique within an EntityType . func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { c.urlParams_.Set("featureId", featureId) return c @@ -48847,12 +48924,12 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts .. // ], // "parameters": { // "featureId": { - // "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType/FeatureGroup.", + // "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType .", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the EntityType or FeatureGroup to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + // "description": "Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+$", // "required": true, @@ -48887,9 +48964,7 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall struct { // // - name: The name of the Features to be deleted. Format: // `projects/{project}/locations/{location}/featurestores/{featurestore -// }/entityTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_grou -// p}/features/{feature}`. +// }/entityTypes/{entity_type}/features/{feature}`. func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -48991,7 +49066,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Do(opts .. // ], // "parameters": { // "name": { - // "description": "Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`", + // "description": "Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+$", // "required": true, @@ -49024,9 +49099,7 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall struct { // // - name: The name of the Feature resource. Format: // `projects/{project}/locations/{location}/featurestores/{featurestore -// }/entityTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_grou -// p}`. +// }/entityTypes/{entity_type}`. func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -49141,7 +49214,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...go // ], // "parameters": { // "name": { - // "description": "Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + // "description": "Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+$", // "required": true, @@ -49174,9 +49247,7 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall struct { // // - parent: The resource name of the Location to list Features. Format: // `projects/{project}/locations/{location}/featurestores/{featurestore -// }/entityTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_grou -// p}`. +// }/entityTypes/{entity_type}`. func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -49215,7 +49286,8 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) LatestStatsC // OrderBy sets the optional parameter "orderBy": A comma-separated list // of fields to order by, sorted in ascending order. Use "desc" after a // field name for descending. Supported fields: * `feature_id` * -// `value_type` * `create_time` * `update_time` +// `value_type` (Not supported for FeatureRegistry Feature) * +// `create_time` * `update_time` func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -49368,7 +49440,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g // "type": "integer" // }, // "orderBy": { - // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `feature_id` * `value_type` * `create_time` * `update_time`", + // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `feature_id` * `value_type` (Not supported for FeatureRegistry Feature) * `create_time` * `update_time`", // "location": "query", // "type": "string" // }, @@ -49384,7 +49456,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + // "description": "Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+$", // "required": true, diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index b75719fd134..b6827d708cc 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -5343,12 +5343,12 @@ ], "parameters": { "featureId": { - "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType/FeatureGroup.", + "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType .", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the EntityType or FeatureGroup to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "description": "Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+$", "required": true, @@ -5376,7 +5376,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`", + "description": "Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+$", "required": true, @@ -5401,7 +5401,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "description": "Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+$", "required": true, @@ -5437,7 +5437,7 @@ "type": "integer" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `feature_id` * `value_type` * `create_time` * `update_time`", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `feature_id` * `value_type` (Not supported for FeatureRegistry Feature) * `create_time` * `update_time`", "location": "query", "type": "string" }, @@ -5453,7 +5453,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "description": "Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+$", "required": true, @@ -10108,6 +10108,66 @@ } } }, + "notebookExecutionJobs": { + "methods": { + "generateAccessToken": { + "description": "Internal only: Called from Compute Engine instance to obtain EUC for owner Anonymous access: authenticates caller using VM identity JWT. Design doc: go/colab-on-vertex-euc-dd", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notebookExecutionJobs/{notebookExecutionJobsId}:generateAccessToken", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.notebookExecutionJobs.generateAccessToken", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the NotebookRuntime resource. Format: `projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:generateAccessToken", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateAccessTokenRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateAccessTokenResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "reportEvent": { + "description": "", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notebookExecutionJobs/{notebookExecutionJobsId}:reportEvent", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.notebookExecutionJobs.reportEvent", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the NotebookRuntime resource. Format: `projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:reportEvent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1ReportRuntimeEventRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ReportRuntimeEventResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "notebookRuntimeTemplates": { "methods": { "create": { @@ -10826,6 +10886,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "patch": { + "description": "Updates a PersistentResource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/persistentResources/{persistentResourcesId}", + "httpMethod": "PATCH", + "id": "aiplatform.projects.locations.persistentResources.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Resource name of a PersistentResource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Specify the fields to be overwritten in the PersistentResource by the update method.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1PersistentResource" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -14921,7 +15015,7 @@ } } }, - "revision": "20230812", + "revision": "20230908", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -16421,7 +16515,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1CreateFeatureRequest": { - "description": "Request message for FeaturestoreService.CreateFeature and FeatureRegistryService.CreateFeature.", + "description": "Request message for FeaturestoreService.CreateFeature.", "id": "GoogleCloudAiplatformV1beta1CreateFeatureRequest", "properties": { "feature": { @@ -16429,11 +16523,11 @@ "description": "Required. The Feature to create." }, "featureId": { - "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType/FeatureGroup.", + "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType .", "type": "string" }, "parent": { - "description": "Required. The resource name of the EntityType or FeatureGroup to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "description": "Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", "type": "string" } }, @@ -18574,6 +18668,39 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata": { + "description": "Details of EndpointService.ExportEndpoint operation.", + "id": "GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata", + "properties": { + "genericMetadata": { + "$ref": "GoogleCloudAiplatformV1beta1GenericOperationMetadata", + "description": "The common part of the operation metadata." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1ExportEndpointResponse": { + "description": "Response message of EndpointService.ExportEndpoint operation.", + "id": "GoogleCloudAiplatformV1beta1ExportEndpointResponse", + "properties": { + "outputInfo": { + "$ref": "GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo", + "description": "Information further describing the output of this Endpoint export." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo": { + "description": "Describes the output of the ExportEndpoint.", + "id": "GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo", + "properties": { + "bigQueryDestination": { + "$ref": "GoogleCloudAiplatformV1beta1BigQueryDestination", + "description": "If the Endpoint is being exported to BigQuery this is the full path of the BigQuery ML model created." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1ExportFeatureValuesOperationMetadata": { "description": "Details of operations that exports Features values.", "id": "GoogleCloudAiplatformV1beta1ExportFeatureValuesOperationMetadata", @@ -18849,7 +18976,7 @@ "type": "string" }, "valueType": { - "description": "Required. Immutable. Type of Feature value.", + "description": "Immutable. Type of Feature value.", "enum": [ "VALUE_TYPE_UNSPECIFIED", "BOOL", @@ -19892,6 +20019,10 @@ "description": "Required. The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters.", "type": "string" }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1beta1EncryptionSpec", + "description": "Immutable. Customer-managed encryption key spec for an Index. If set, this Index and all sub-resources of this Index will be secured by this key." + }, "etag": { "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", "type": "string" @@ -19910,7 +20041,7 @@ ], "enumDescriptions": [ "Should not be used.", - "BatchUpdate: user can call UpdateIndex with files on Cloud Storage of datapoints to update.", + "BatchUpdate: user can call UpdateIndex with files on Cloud Storage of Datapoints to update.", "StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update the Index and the updates will be applied in corresponding DeployedIndexes in nearly real-time." ], "type": "string" @@ -19965,7 +20096,7 @@ "type": "array" }, "restricts": { - "description": "Optional. List of Restrict of the datapoint, used to perform \"restricted searches\" where boolean rule are used to filter the subset of the database eligible for matching. See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering", + "description": "Optional. List of Restrict of the datapoint, used to perform \"restricted searches\" where boolean rule are used to filter the subset of the database eligible for matching. This uses categorical tokens. See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering", "items": { "$ref": "GoogleCloudAiplatformV1beta1IndexDatapointRestriction" }, @@ -19990,21 +20121,21 @@ "id": "GoogleCloudAiplatformV1beta1IndexDatapointRestriction", "properties": { "allowList": { - "description": "The attributes to allow in this namespace. eg: 'red'", + "description": "The attributes to allow in this namespace. e.g.: 'red'", "items": { "type": "string" }, "type": "array" }, "denyList": { - "description": "The attributes to deny in this namespace. eg: 'blue'", + "description": "The attributes to deny in this namespace. e.g.: 'blue'", "items": { "type": "string" }, "type": "array" }, "namespace": { - "description": "The namespace of this restriction. eg: color.", + "description": "The namespace of this restriction. e.g.: color.", "type": "string" } }, @@ -20041,6 +20172,10 @@ "description": "Optional. Deprecated: If true, expose the IndexEndpoint via private service connect. Only one of the fields, network or enable_private_service_connect, can be set.", "type": "boolean" }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1beta1EncryptionSpec", + "description": "Immutable. Customer-managed encryption key spec for an IndexEndpoint. If set, this IndexEndpoint and all sub-resources of this IndexEndpoint will be secured by this key." + }, "etag": { "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", "type": "string" @@ -20465,7 +20600,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1ListFeaturesResponse": { - "description": "Response message for FeaturestoreService.ListFeatures. Response message for FeatureRegistryService.ListFeatures.", + "description": "Response message for FeaturestoreService.ListFeatures.", "id": "GoogleCloudAiplatformV1beta1ListFeaturesResponse", "properties": { "features": { @@ -23173,6 +23308,11 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "version": { + "description": "Output only. The VM os image version of NotebookRuntime.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -24514,14 +24654,20 @@ "description": "Configuration information for the Ray cluster. For experimental launch, Ray cluster creation and Persistent cluster creation are 1:1 mapping: We will provision all the nodes within the Persistent cluster as Ray nodes.", "id": "GoogleCloudAiplatformV1beta1RaySpec", "properties": { - "headMachineSpec": { - "$ref": "GoogleCloudAiplatformV1beta1MachineSpec", - "deprecated": true, - "description": "Optional. Will use the machine from the first workerpool as the head node by default. For Ray-on-Vertex Experimental scope launch, we will only support one resource pool for Ray cluster and thus will not support head machine selection." + "headNodeResourcePoolId": { + "description": "Optional. This will be used to indicate which resource pool will serve as the Ray head node(the first node within that pool). Will use the machine from the first workerpool as the head node by default if this field is not set.", + "type": "string" }, "imageUri": { "description": "Optional. Default image for user to choose a preferred ML framework(e.g. tensorflow or Pytorch) by choosing from Vertex prebuild images(https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image, Otherwise, use the {@code resource_pool_images} field.", "type": "string" + }, + "resourcePoolImages": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Required if image_uri is not set. A map of resource_pool_id to prebuild Ray image if user need to use different images for different head/worker pools. This map needs to cover all the resource pool ids. Example: { \"ray_head_node_pool\": \"head image\" \"ray_worker_node_pool1\": \"worker image\" \"ray_worker_node_pool2\": \"another worker image\" }", + "type": "object" } }, "type": "object" @@ -24876,6 +25022,11 @@ "description": "Output only. URIs for user to connect to the Cluster. Example: { \"RAY_HEAD_NODE_INTERNAL_IP\": \"head-node-IP:10001\" \"RAY_DASHBOARD_URI\": \"ray-dashboard-address:8888\" }", "readOnly": true, "type": "object" + }, + "notebookRuntimeTemplate": { + "description": "Output only. The resource name of NotebookRuntimeTemplate for the RoV Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC (if set), and with the same Ray and Python version as the Persistent Cluster. Example: \"projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123\"", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -29651,6 +29802,13 @@ "description": "Required. The identifier of the client that is requesting the suggestion. If multiple SuggestTrialsRequests have the same `client_id`, the service will return the identical suggested Trial if the Trial is pending, and provide a new Trial if the last suggested Trial was completed.", "type": "string" }, + "contexts": { + "description": "Optional. This allows you to specify the \"context\" for a Trial; a context is a slice (a subspace) of the search space. Typical uses for contexts: 1) You are using Vizier to tune a server for best performance, but there's a strong weekly cycle. The context specifies the day-of-week. This allows Tuesday to generalize from Wednesday without assuming that everything is identical. 2) Imagine you're optimizing some medical treatment for people. As they walk in the door, you know certain facts about them (e.g. sex, weight, height, blood-pressure). Put that information in the context, and Vizier will adapt its suggestions to the patient. 3) You want to do a fair A/B test efficiently. Specify the \"A\" and \"B\" conditions as contexts, and Vizier will generalize between \"A\" and \"B\" conditions. If they are similar, this will allow Vizier to converge to the optimum faster than if \"A\" and \"B\" were separate Studies. NOTE: You can also enter contexts as REQUESTED Trials, e.g. via the CreateTrial() RPC; that's the asynchronous option where you don't need a close association between contexts and suggestions. NOTE: All the Parameters you set in a context MUST be defined in the Study. NOTE: You must supply 0 or $suggestion_count contexts. If you don't supply any contexts, Vizier will make suggestions from the full search space specified in the StudySpec; if you supply a full set of context, each suggestion will match the corresponding context. NOTE: A Context with no features set matches anything, and allows suggestions from the full search space. NOTE: Contexts MUST lie within the search space specified in the StudySpec. It's an error if they don't. NOTE: Contexts preferentially match ACTIVE then REQUESTED trials before new suggestions are generated. NOTE: Generation of suggestions involves a match between a Context and (optionally) a REQUESTED trial; if that match is not fully specified, a suggestion will be geneated in the merged subspace.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrialContext" + }, + "type": "array" + }, "suggestionCount": { "description": "Required. The number of suggestions requested. It must be positive.", "format": "int32", @@ -30458,6 +30616,24 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1TrialContext": { + "description": "Next ID: 3", + "id": "GoogleCloudAiplatformV1beta1TrialContext", + "properties": { + "description": { + "description": "A human-readable field which can store a description of this context. This will become part of the resulting Trial's description field.", + "type": "string" + }, + "parameters": { + "description": "If/when a Trial is generated or selected from this Context, its Parameters will match any parameters specified here. (I.e. if this context specifies parameter name:'a' int_value:3, then a resulting Trial will have int_value:3 for its parameter named 'a'.) Note that we first attempt to match existing REQUESTED Trials with contexts, and if there are no matches, we generate suggestions in the subspace defined by the parameters specified here. NOTE: a Context without any Parameters matches the entire feasible search space.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrialParameter" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1TrialParameter": { "description": "A message representing a parameter to be tuned.", "id": "GoogleCloudAiplatformV1beta1TrialParameter", @@ -30645,6 +30821,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1UpdatePersistentResourceOperationMetadata": { + "description": "Details of operations that perform update PersistentResource.", + "id": "GoogleCloudAiplatformV1beta1UpdatePersistentResourceOperationMetadata", + "properties": { + "genericMetadata": { + "$ref": "GoogleCloudAiplatformV1beta1GenericOperationMetadata", + "description": "Operation metadata for PersistentResource." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1UpdateSpecialistPoolOperationMetadata": { "description": "Runtime operation metadata for SpecialistPoolService.UpdateSpecialistPool.", "id": "GoogleCloudAiplatformV1beta1UpdateSpecialistPoolOperationMetadata", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 8c29cfd7e00..48c1482f609 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -199,6 +199,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.ModelMonitors = NewProjectsLocationsModelMonitorsService(s) rs.Models = NewProjectsLocationsModelsService(s) rs.NasJobs = NewProjectsLocationsNasJobsService(s) + rs.NotebookExecutionJobs = NewProjectsLocationsNotebookExecutionJobsService(s) rs.NotebookRuntimeTemplates = NewProjectsLocationsNotebookRuntimeTemplatesService(s) rs.NotebookRuntimes = NewProjectsLocationsNotebookRuntimesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) @@ -259,6 +260,8 @@ type ProjectsLocationsService struct { NasJobs *ProjectsLocationsNasJobsService + NotebookExecutionJobs *ProjectsLocationsNotebookExecutionJobsService + NotebookRuntimeTemplates *ProjectsLocationsNotebookRuntimeTemplatesService NotebookRuntimes *ProjectsLocationsNotebookRuntimesService @@ -1001,6 +1004,15 @@ type ProjectsLocationsNasJobsNasTrialDetailsService struct { s *Service } +func NewProjectsLocationsNotebookExecutionJobsService(s *Service) *ProjectsLocationsNotebookExecutionJobsService { + rs := &ProjectsLocationsNotebookExecutionJobsService{s: s} + return rs +} + +type ProjectsLocationsNotebookExecutionJobsService struct { + s *Service +} + func NewProjectsLocationsNotebookRuntimeTemplatesService(s *Service) *ProjectsLocationsNotebookRuntimeTemplatesService { rs := &ProjectsLocationsNotebookRuntimeTemplatesService{s: s} return rs @@ -4284,8 +4296,7 @@ func (s *GoogleCloudAiplatformV1beta1CreateFeatureOperationMetadata) MarshalJSON } // GoogleCloudAiplatformV1beta1CreateFeatureRequest: Request message for -// FeaturestoreService.CreateFeature and -// FeatureRegistryService.CreateFeature. +// FeaturestoreService.CreateFeature. type GoogleCloudAiplatformV1beta1CreateFeatureRequest struct { // Feature: Required. The Feature to create. Feature *GoogleCloudAiplatformV1beta1Feature `json:"feature,omitempty"` @@ -4294,15 +4305,13 @@ type GoogleCloudAiplatformV1beta1CreateFeatureRequest struct { // the final component of the Feature's resource name. This value may be // up to 128 characters, and valid characters are `[a-z0-9_]`. The first // character cannot be a number. The value must be unique within an - // EntityType/FeatureGroup. + // EntityType . FeatureId string `json:"featureId,omitempty"` - // Parent: Required. The resource name of the EntityType or FeatureGroup - // to create a Feature. Format: + // Parent: Required. The resource name of the EntityType to create a + // Feature. Format: // `projects/{project}/locations/{location}/featurestores/{featurestore}/ // entityTypes/{entity_type}` - // `projects/{project}/locations/{location}/featureGroups/{feature_group} - // ` Parent string `json:"parent,omitempty"` // ForceSendFields is a list of field names (e.g. "Feature") to @@ -8283,6 +8292,97 @@ func (s *GoogleCloudAiplatformV1beta1ExportDataResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata: Details +// of EndpointService.ExportEndpoint operation. +type GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata struct { + // GenericMetadata: The common part of the operation metadata. + GenericMetadata *GoogleCloudAiplatformV1beta1GenericOperationMetadata `json:"genericMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 *GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1ExportEndpointResponse: Response message +// of EndpointService.ExportEndpoint operation. +type GoogleCloudAiplatformV1beta1ExportEndpointResponse struct { + // OutputInfo: Information further describing the output of this + // Endpoint export. + OutputInfo *GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo `json:"outputInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OutputInfo") 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. "OutputInfo") 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 *GoogleCloudAiplatformV1beta1ExportEndpointResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ExportEndpointResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo: +// Describes the output of the ExportEndpoint. +type GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo struct { + // BigQueryDestination: If the Endpoint is being exported to BigQuery + // this is the full path of the BigQuery ML model created. + BigQueryDestination *GoogleCloudAiplatformV1beta1BigQueryDestination `json:"bigQueryDestination,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigQueryDestination") + // 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. "BigQueryDestination") 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 *GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1ExportFeatureValuesOperationMetadata: // Details of operations that exports Features values. type GoogleCloudAiplatformV1beta1ExportFeatureValuesOperationMetadata struct { @@ -8809,7 +8909,7 @@ type GoogleCloudAiplatformV1beta1Feature struct { // recently updated. UpdateTime string `json:"updateTime,omitempty"` - // ValueType: Required. Immutable. Type of Feature value. + // ValueType: Immutable. Type of Feature value. // // Possible values: // "VALUE_TYPE_UNSPECIFIED" - The value type is unspecified. @@ -10789,6 +10889,11 @@ type GoogleCloudAiplatformV1beta1Index struct { // up to 128 characters long and can consist of any UTF-8 characters. DisplayName string `json:"displayName,omitempty"` + // EncryptionSpec: Immutable. Customer-managed encryption key spec for + // an Index. If set, this Index and all sub-resources of this Index will + // be secured by this key. + EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` + // Etag: Used to perform consistent read-modify-write updates. If not // set, a blind "overwrite" update happens. Etag string `json:"etag,omitempty"` @@ -10802,7 +10907,7 @@ type GoogleCloudAiplatformV1beta1Index struct { // Possible values: // "INDEX_UPDATE_METHOD_UNSPECIFIED" - Should not be used. // "BATCH_UPDATE" - BatchUpdate: user can call UpdateIndex with files - // on Cloud Storage of datapoints to update. + // on Cloud Storage of Datapoints to update. // "STREAM_UPDATE" - StreamUpdate: user can call // UpsertDatapoints/DeleteDatapoints to update the Index and the updates // will be applied in corresponding DeployedIndexes in nearly real-time. @@ -10885,7 +10990,8 @@ type GoogleCloudAiplatformV1beta1IndexDatapoint struct { // Restricts: Optional. List of Restrict of the datapoint, used to // perform "restricted searches" where boolean rule are used to filter - // the subset of the database eligible for matching. See: + // the subset of the database eligible for matching. This uses + // categorical tokens. See: // https://cloud.google.com/vertex-ai/docs/matching-engine/filtering Restricts []*GoogleCloudAiplatformV1beta1IndexDatapointRestriction `json:"restricts,omitempty"` @@ -10969,13 +11075,13 @@ func (s *GoogleCloudAiplatformV1beta1IndexDatapointCrowdingTag) MarshalJSON() ([ // a datapoint which describe its attributes(tokens) from each of // several attribute categories(namespaces). type GoogleCloudAiplatformV1beta1IndexDatapointRestriction struct { - // AllowList: The attributes to allow in this namespace. eg: 'red' + // AllowList: The attributes to allow in this namespace. e.g.: 'red' AllowList []string `json:"allowList,omitempty"` - // DenyList: The attributes to deny in this namespace. eg: 'blue' + // DenyList: The attributes to deny in this namespace. e.g.: 'blue' DenyList []string `json:"denyList,omitempty"` - // Namespace: The namespace of this restriction. eg: color. + // Namespace: The namespace of this restriction. e.g.: color. Namespace string `json:"namespace,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowList") to @@ -11024,6 +11130,11 @@ type GoogleCloudAiplatformV1beta1IndexEndpoint struct { // fields, network or enable_private_service_connect, can be set. EnablePrivateServiceConnect bool `json:"enablePrivateServiceConnect,omitempty"` + // EncryptionSpec: Immutable. Customer-managed encryption key spec for + // an IndexEndpoint. If set, this IndexEndpoint and all sub-resources of + // this IndexEndpoint will be secured by this key. + EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` + // Etag: Used to perform consistent read-modify-write updates. If not // set, a blind "overwrite" update happens. Etag string `json:"etag,omitempty"` @@ -11898,8 +12009,7 @@ func (s *GoogleCloudAiplatformV1beta1ListExecutionsResponse) MarshalJSON() ([]by } // GoogleCloudAiplatformV1beta1ListFeaturesResponse: Response message -// for FeaturestoreService.ListFeatures. Response message for -// FeatureRegistryService.ListFeatures. +// for FeaturestoreService.ListFeatures. type GoogleCloudAiplatformV1beta1ListFeaturesResponse struct { // Features: The Features matching the request. Features []*GoogleCloudAiplatformV1beta1Feature `json:"features,omitempty"` @@ -16810,6 +16920,9 @@ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { // recently updated. UpdateTime string `json:"updateTime,omitempty"` + // Version: Output only. The VM os image version of NotebookRuntime. + Version string `json:"version,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -18978,11 +19091,11 @@ func (s *GoogleCloudAiplatformV1beta1RawPredictRequest) MarshalJSON() ([]byte, e // Persistent cluster creation are 1:1 mapping: We will provision all // the nodes within the Persistent cluster as Ray nodes. type GoogleCloudAiplatformV1beta1RaySpec struct { - // HeadMachineSpec: Optional. Will use the machine from the first - // workerpool as the head node by default. For Ray-on-Vertex - // Experimental scope launch, we will only support one resource pool for - // Ray cluster and thus will not support head machine selection. - HeadMachineSpec *GoogleCloudAiplatformV1beta1MachineSpec `json:"headMachineSpec,omitempty"` + // HeadNodeResourcePoolId: Optional. This will be used to indicate which + // resource pool will serve as the Ray head node(the first node within + // that pool). Will use the machine from the first workerpool as the + // head node by default if this field is not set. + HeadNodeResourcePoolId string `json:"headNodeResourcePoolId,omitempty"` // ImageUri: Optional. Default image for user to choose a preferred ML // framework(e.g. tensorflow or Pytorch) by choosing from Vertex @@ -18993,18 +19106,27 @@ type GoogleCloudAiplatformV1beta1RaySpec struct { // image, Otherwise, use the {@code resource_pool_images} field. ImageUri string `json:"imageUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeadMachineSpec") 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. + // ResourcePoolImages: Optional. Required if image_uri is not set. A map + // of resource_pool_id to prebuild Ray image if user need to use + // different images for different head/worker pools. This map needs to + // cover all the resource pool ids. Example: { "ray_head_node_pool": + // "head image" "ray_worker_node_pool1": "worker image" + // "ray_worker_node_pool2": "another worker image" } + ResourcePoolImages map[string]string `json:"resourcePoolImages,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "HeadNodeResourcePoolId") 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. "HeadMachineSpec") 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 + // NullFields is a list of field names (e.g. "HeadNodeResourcePoolId") + // 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. @@ -19742,6 +19864,13 @@ type GoogleCloudAiplatformV1beta1ResourceRuntime struct { // "RAY_DASHBOARD_URI": "ray-dashboard-address:8888" } AccessUris map[string]string `json:"accessUris,omitempty"` + // NotebookRuntimeTemplate: Output only. The resource name of + // NotebookRuntimeTemplate for the RoV Persistent Cluster The + // NotebokRuntimeTemplate is created in the same VPC (if set), and with + // the same Ray and Python version as the Persistent Cluster. Example: + // "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123" + NotebookRuntimeTemplate string `json:"notebookRuntimeTemplate,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccessUris") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -29630,6 +29759,38 @@ type GoogleCloudAiplatformV1beta1SuggestTrialsRequest struct { // Trial was completed. ClientId string `json:"clientId,omitempty"` + // Contexts: Optional. This allows you to specify the "context" for a + // Trial; a context is a slice (a subspace) of the search space. Typical + // uses for contexts: 1) You are using Vizier to tune a server for best + // performance, but there's a strong weekly cycle. The context specifies + // the day-of-week. This allows Tuesday to generalize from Wednesday + // without assuming that everything is identical. 2) Imagine you're + // optimizing some medical treatment for people. As they walk in the + // door, you know certain facts about them (e.g. sex, weight, height, + // blood-pressure). Put that information in the context, and Vizier will + // adapt its suggestions to the patient. 3) You want to do a fair A/B + // test efficiently. Specify the "A" and "B" conditions as contexts, and + // Vizier will generalize between "A" and "B" conditions. If they are + // similar, this will allow Vizier to converge to the optimum faster + // than if "A" and "B" were separate Studies. NOTE: You can also enter + // contexts as REQUESTED Trials, e.g. via the CreateTrial() RPC; that's + // the asynchronous option where you don't need a close association + // between contexts and suggestions. NOTE: All the Parameters you set in + // a context MUST be defined in the Study. NOTE: You must supply 0 or + // $suggestion_count contexts. If you don't supply any contexts, Vizier + // will make suggestions from the full search space specified in the + // StudySpec; if you supply a full set of context, each suggestion will + // match the corresponding context. NOTE: A Context with no features set + // matches anything, and allows suggestions from the full search space. + // NOTE: Contexts MUST lie within the search space specified in the + // StudySpec. It's an error if they don't. NOTE: Contexts preferentially + // match ACTIVE then REQUESTED trials before new suggestions are + // generated. NOTE: Generation of suggestions involves a match between a + // Context and (optionally) a REQUESTED trial; if that match is not + // fully specified, a suggestion will be geneated in the merged + // subspace. + Contexts []*GoogleCloudAiplatformV1beta1TrialContext `json:"contexts,omitempty"` + // SuggestionCount: Required. The number of suggestions requested. It // must be positive. SuggestionCount int64 `json:"suggestionCount,omitempty"` @@ -30790,6 +30951,46 @@ func (s *GoogleCloudAiplatformV1beta1Trial) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1TrialContext: Next ID: 3 +type GoogleCloudAiplatformV1beta1TrialContext struct { + // Description: A human-readable field which can store a description of + // this context. This will become part of the resulting Trial's + // description field. + Description string `json:"description,omitempty"` + + // Parameters: If/when a Trial is generated or selected from this + // Context, its Parameters will match any parameters specified here. + // (I.e. if this context specifies parameter name:'a' int_value:3, then + // a resulting Trial will have int_value:3 for its parameter named 'a'.) + // Note that we first attempt to match existing REQUESTED Trials with + // contexts, and if there are no matches, we generate suggestions in the + // subspace defined by the parameters specified here. NOTE: a Context + // without any Parameters matches the entire feasible search space. + Parameters []*GoogleCloudAiplatformV1beta1TrialParameter `json:"parameters,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleCloudAiplatformV1beta1TrialContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrialContext + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1TrialParameter: A message representing a // parameter to be tuned. type GoogleCloudAiplatformV1beta1TrialParameter struct { @@ -31229,6 +31430,37 @@ func (s *GoogleCloudAiplatformV1beta1UpdateModelDeploymentMonitoringJobOperation return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1UpdatePersistentResourceOperationMetadata: +// +// Details of operations that perform update PersistentResource. +type GoogleCloudAiplatformV1beta1UpdatePersistentResourceOperationMetadata struct { + // GenericMetadata: Operation metadata for PersistentResource. + GenericMetadata *GoogleCloudAiplatformV1beta1GenericOperationMetadata `json:"genericMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 *GoogleCloudAiplatformV1beta1UpdatePersistentResourceOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1UpdatePersistentResourceOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1UpdateSpecialistPoolOperationMetadata: // Runtime operation metadata for // SpecialistPoolService.UpdateSpecialistPool. @@ -58195,12 +58427,10 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall struct { // Create: Creates a new Feature in a given EntityType. // -// - parent: The resource name of the EntityType or FeatureGroup to -// create a Feature. Format: +// - parent: The resource name of the EntityType to create a Feature. +// Format: // `projects/{project}/locations/{location}/featurestores/{featurestore -// }/entityTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_grou -// p}`. +// }/entityTypes/{entity_type}`. func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Create(parent string, googlecloudaiplatformv1beta1feature *GoogleCloudAiplatformV1beta1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -58212,7 +58442,7 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Create(parent // to use for the Feature, which will become the final component of the // Feature's resource name. This value may be up to 128 characters, and // valid characters are `[a-z0-9_]`. The first character cannot be a -// number. The value must be unique within an EntityType/FeatureGroup. +// number. The value must be unique within an EntityType . func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { c.urlParams_.Set("featureId", featureId) return c @@ -58318,12 +58548,12 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts .. // ], // "parameters": { // "featureId": { - // "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType/FeatureGroup.", + // "description": "Required. The ID to use for the Feature, which will become the final component of the Feature's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within an EntityType .", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the EntityType or FeatureGroup to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + // "description": "Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+$", // "required": true, @@ -58358,9 +58588,7 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall struct { // // - name: The name of the Features to be deleted. Format: // `projects/{project}/locations/{location}/featurestores/{featurestore -// }/entityTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_grou -// p}/features/{feature}`. +// }/entityTypes/{entity_type}/features/{feature}`. func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -58462,7 +58690,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Do(opts .. // ], // "parameters": { // "name": { - // "description": "Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`", + // "description": "Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+$", // "required": true, @@ -58495,9 +58723,7 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall struct { // // - name: The name of the Feature resource. Format: // `projects/{project}/locations/{location}/featurestores/{featurestore -// }/entityTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_grou -// p}`. +// }/entityTypes/{entity_type}`. func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -58613,7 +58839,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...go // ], // "parameters": { // "name": { - // "description": "Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + // "description": "Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+$", // "required": true, @@ -58646,9 +58872,7 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall struct { // // - parent: The resource name of the Location to list Features. Format: // `projects/{project}/locations/{location}/featurestores/{featurestore -// }/entityTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_grou -// p}`. +// }/entityTypes/{entity_type}`. func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -58687,7 +58911,8 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) LatestStatsC // OrderBy sets the optional parameter "orderBy": A comma-separated list // of fields to order by, sorted in ascending order. Use "desc" after a // field name for descending. Supported fields: * `feature_id` * -// `value_type` * `create_time` * `update_time` +// `value_type` (Not supported for FeatureRegistry Feature) * +// `create_time` * `update_time` func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -58840,7 +59065,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g // "type": "integer" // }, // "orderBy": { - // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `feature_id` * `value_type` * `create_time` * `update_time`", + // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `feature_id` * `value_type` (Not supported for FeatureRegistry Feature) * `create_time` * `update_time`", // "location": "query", // "type": "string" // }, @@ -58856,7 +59081,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + // "description": "Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+$", // "required": true, @@ -82639,6 +82864,302 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Pages(ctx context.Cont } } +// method id "aiplatform.projects.locations.notebookExecutionJobs.generateAccessToken": + +type ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall struct { + s *Service + name string + googlecloudaiplatformv1beta1generateaccesstokenrequest *GoogleCloudAiplatformV1beta1GenerateAccessTokenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateAccessToken: Internal only: Called from Compute Engine +// instance to obtain EUC for owner Anonymous access: authenticates +// caller using VM identity JWT. Design doc: go/colab-on-vertex-euc-dd +// +// - name: The name of the NotebookRuntime resource. Format: +// `projects/{project}/locations/{location}/notebookRuntimes/{notebook_ +// runtime}`. +func (r *ProjectsLocationsNotebookExecutionJobsService) GenerateAccessToken(name string, googlecloudaiplatformv1beta1generateaccesstokenrequest *GoogleCloudAiplatformV1beta1GenerateAccessTokenRequest) *ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall { + c := &ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1generateaccesstokenrequest = googlecloudaiplatformv1beta1generateaccesstokenrequest + 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 *ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall { + 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 *ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall { + 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 *ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall) 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.googlecloudaiplatformv1beta1generateaccesstokenrequest) + 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, "v1beta1/{+name}:generateAccessToken") + 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 "aiplatform.projects.locations.notebookExecutionJobs.generateAccessToken" call. +// Exactly one of +// *GoogleCloudAiplatformV1beta1GenerateAccessTokenResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1beta1GenerateAccessTokenResponse.ServerRespons +// e.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 *ProjectsLocationsNotebookExecutionJobsGenerateAccessTokenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateAccessTokenResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateAccessTokenResponse{ + 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": "Internal only: Called from Compute Engine instance to obtain EUC for owner Anonymous access: authenticates caller using VM identity JWT. Design doc: go/colab-on-vertex-euc-dd", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notebookExecutionJobs/{notebookExecutionJobsId}:generateAccessToken", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.notebookExecutionJobs.generateAccessToken", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the NotebookRuntime resource. Format: `projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:generateAccessToken", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1GenerateAccessTokenRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1beta1GenerateAccessTokenResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.notebookExecutionJobs.reportEvent": + +type ProjectsLocationsNotebookExecutionJobsReportEventCall struct { + s *Service + name string + googlecloudaiplatformv1beta1reportruntimeeventrequest *GoogleCloudAiplatformV1beta1ReportRuntimeEventRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ReportEvent: +// +// - name: The name of the NotebookRuntime resource. Format: +// `projects/{project}/locations/{location}/notebookRuntimes/{notebook_ +// runtime}`. +func (r *ProjectsLocationsNotebookExecutionJobsService) ReportEvent(name string, googlecloudaiplatformv1beta1reportruntimeeventrequest *GoogleCloudAiplatformV1beta1ReportRuntimeEventRequest) *ProjectsLocationsNotebookExecutionJobsReportEventCall { + c := &ProjectsLocationsNotebookExecutionJobsReportEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1reportruntimeeventrequest = googlecloudaiplatformv1beta1reportruntimeeventrequest + 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 *ProjectsLocationsNotebookExecutionJobsReportEventCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsReportEventCall { + 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 *ProjectsLocationsNotebookExecutionJobsReportEventCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsReportEventCall { + 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 *ProjectsLocationsNotebookExecutionJobsReportEventCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotebookExecutionJobsReportEventCall) 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.googlecloudaiplatformv1beta1reportruntimeeventrequest) + 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, "v1beta1/{+name}:reportEvent") + 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 "aiplatform.projects.locations.notebookExecutionJobs.reportEvent" call. +// Exactly one of +// *GoogleCloudAiplatformV1beta1ReportRuntimeEventResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudAiplatformV1beta1ReportRuntimeEventResponse.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 *ProjectsLocationsNotebookExecutionJobsReportEventCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ReportRuntimeEventResponse, 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 := &GoogleCloudAiplatformV1beta1ReportRuntimeEventResponse{ + 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": "", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notebookExecutionJobs/{notebookExecutionJobsId}:reportEvent", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.notebookExecutionJobs.reportEvent", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the NotebookRuntime resource. Format: `projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:reportEvent", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1ReportRuntimeEventRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1beta1ReportRuntimeEventResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.notebookRuntimeTemplates.create": type ProjectsLocationsNotebookRuntimeTemplatesCreateCall struct { @@ -86357,6 +86878,162 @@ func (c *ProjectsLocationsPersistentResourcesListCall) Pages(ctx context.Context } } +// method id "aiplatform.projects.locations.persistentResources.patch": + +type ProjectsLocationsPersistentResourcesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1persistentresource *GoogleCloudAiplatformV1beta1PersistentResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a PersistentResource. +// +// - name: Immutable. Resource name of a PersistentResource. +func (r *ProjectsLocationsPersistentResourcesService) Patch(name string, googlecloudaiplatformv1beta1persistentresource *GoogleCloudAiplatformV1beta1PersistentResource) *ProjectsLocationsPersistentResourcesPatchCall { + c := &ProjectsLocationsPersistentResourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1persistentresource = googlecloudaiplatformv1beta1persistentresource + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. +// Specify the fields to be overwritten in the PersistentResource by the +// update method. +func (c *ProjectsLocationsPersistentResourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPersistentResourcesPatchCall { + 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 *ProjectsLocationsPersistentResourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesPatchCall { + 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 *ProjectsLocationsPersistentResourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesPatchCall { + 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 *ProjectsLocationsPersistentResourcesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPersistentResourcesPatchCall) 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.googlecloudaiplatformv1beta1persistentresource) + 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, "v1beta1/{+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 "aiplatform.projects.locations.persistentResources.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsPersistentResourcesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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 a PersistentResource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/persistentResources/{persistentResourcesId}", + // "httpMethod": "PATCH", + // "id": "aiplatform.projects.locations.persistentResources.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. Resource name of a PersistentResource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Specify the fields to be overwritten in the PersistentResource by the update method.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1PersistentResource" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.persistentResources.operations.cancel": type ProjectsLocationsPersistentResourcesOperationsCancelCall struct { diff --git a/api-list.json b/api-list.json index 7e858b04386..b0c88f17b92 100644 --- a/api-list.json +++ b/api-list.json @@ -4732,6 +4732,21 @@ "documentationLink": "https://cloud.google.com/pubsub/lite/docs", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "rapidmigrationassessment:v1", + "name": "rapidmigrationassessment", + "version": "v1", + "title": "Rapid Migration Assessment API", + "description": "The Rapid Migration Assessment service is our first-party migration assessment and planning tool.", + "discoveryRestUrl": "https://rapidmigrationassessment.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/migration-center", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "readerrevenuesubscriptionlinking:v1", diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 8f2e62ec759..0179acba706 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -181,6 +181,53 @@ }, "workloads": { "methods": { + "analyzeWorkloadMove": { + "description": "Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:analyzeWorkloadMove", + "httpMethod": "GET", + "id": "assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove", + "parameterOrder": [ + "target" + ], + "parameters": { + "assetTypes": { + "description": "Optional. List of asset types to be analyzed, including and under the source resource. If empty, all assets are analyzed. The complete list of asset types is available [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).", + "location": "query", + "repeated": true, + "type": "string" + }, + "pageSize": { + "description": "Optional. Page size. If a value is not specified, the default value of 10 is used.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The page token from the previous response. It needs to be passed in the second and following requests.", + "location": "query", + "type": "string" + }, + "project": { + "description": "The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: \"projects/{PROJECT_NUMBER}\" or \"projects/{PROJECT_ID}\" For example: \"projects/951040570662\" when specifying a project number, or \"projects/my-project-123\" when specifying a project ID.", + "location": "query", + "type": "string" + }, + "target": { + "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+target}:analyzeWorkloadMove", + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates Assured Workload.", "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads", @@ -519,7 +566,7 @@ } } }, - "revision": "20230831", + "revision": "20230907", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -544,6 +591,46 @@ "properties": {}, "type": "object" }, + "GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse": { + "description": "Response containing the analysis results for the hypothetical resource move.", + "id": "GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse", + "properties": { + "assetMoveAnalyses": { + "description": "List of analysis results for each asset in scope.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1AssetMoveAnalysis" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The next page token. Is empty if the last page is reached.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1AssetMoveAnalysis": { + "description": "Represents move analysis results for an asset.", + "id": "GoogleCloudAssuredworkloadsV1AssetMoveAnalysis", + "properties": { + "analysisGroups": { + "description": "List of eligible analyses performed for the asset.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1MoveAnalysisGroup" + }, + "type": "array" + }, + "asset": { + "description": "The full resource name of the asset being analyzed. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1", + "type": "string" + }, + "assetType": { + "description": "Type of the asset being analyzed. Possible values will be among the ones listed [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { "description": "Operation metadata to give request details of CreateWorkload.", "id": "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata", @@ -644,6 +731,57 @@ }, "type": "object" }, + "GoogleCloudAssuredworkloadsV1MoveAnalysisGroup": { + "description": "Represents a logical group of checks performed for an asset. If successful, the group contains the analysis result, otherwise it contains an error with the failure reason.", + "id": "GoogleCloudAssuredworkloadsV1MoveAnalysisGroup", + "properties": { + "analysisResult": { + "$ref": "GoogleCloudAssuredworkloadsV1MoveAnalysisResult", + "description": "Result of a successful analysis." + }, + "displayName": { + "description": "Name of the analysis group.", + "type": "string" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Error details for a failed analysis." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1MoveAnalysisResult": { + "description": "Represents the successful move analysis results for a group.", + "id": "GoogleCloudAssuredworkloadsV1MoveAnalysisResult", + "properties": { + "blockers": { + "description": "List of blockers. If not resolved, these will result in compliance violations in the target.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1MoveImpact" + }, + "type": "array" + }, + "warnings": { + "description": "List of warnings. These are risks that may or may not result in compliance violations.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1MoveImpact" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1MoveImpact": { + "description": "Represents the impact of moving the asset to the target.", + "id": "GoogleCloudAssuredworkloadsV1MoveImpact", + "properties": { + "detail": { + "description": "Explanation of the impact.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest": { "description": "Request for updating permission settings for a partner workload.", "id": "GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest", diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index c931a915566..b141a53bda0 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -254,6 +254,84 @@ type GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse struct { googleapi.ServerResponse `json:"-"` } +// GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse: Response +// containing the analysis results for the hypothetical resource move. +type GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse struct { + // AssetMoveAnalyses: List of analysis results for each asset in scope. + AssetMoveAnalyses []*GoogleCloudAssuredworkloadsV1AssetMoveAnalysis `json:"assetMoveAnalyses,omitempty"` + + // NextPageToken: The next page token. Is empty if the last page is + // reached. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AssetMoveAnalyses") + // 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. "AssetMoveAnalyses") 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 *GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1AssetMoveAnalysis: Represents move +// analysis results for an asset. +type GoogleCloudAssuredworkloadsV1AssetMoveAnalysis struct { + // AnalysisGroups: List of eligible analyses performed for the asset. + AnalysisGroups []*GoogleCloudAssuredworkloadsV1MoveAnalysisGroup `json:"analysisGroups,omitempty"` + + // Asset: The full resource name of the asset being analyzed. Example: + // //compute.googleapis.com/projects/my_project_123/zones/zone1/instances + // /instance1 + Asset string `json:"asset,omitempty"` + + // AssetType: Type of the asset being analyzed. Possible values will be + // among the ones listed here + // (https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + AssetType string `json:"assetType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnalysisGroups") 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. "AnalysisGroups") 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 *GoogleCloudAssuredworkloadsV1AssetMoveAnalysis) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1AssetMoveAnalysis + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata: // Operation metadata to give request details of CreateWorkload. type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct { @@ -395,6 +473,107 @@ func (s *GoogleCloudAssuredworkloadsV1ListWorkloadsResponse) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAssuredworkloadsV1MoveAnalysisGroup: Represents a logical +// group of checks performed for an asset. If successful, the group +// contains the analysis result, otherwise it contains an error with the +// failure reason. +type GoogleCloudAssuredworkloadsV1MoveAnalysisGroup struct { + // AnalysisResult: Result of a successful analysis. + AnalysisResult *GoogleCloudAssuredworkloadsV1MoveAnalysisResult `json:"analysisResult,omitempty"` + + // DisplayName: Name of the analysis group. + DisplayName string `json:"displayName,omitempty"` + + // Error: Error details for a failed analysis. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnalysisResult") 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. "AnalysisResult") 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 *GoogleCloudAssuredworkloadsV1MoveAnalysisGroup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1MoveAnalysisGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1MoveAnalysisResult: Represents the +// successful move analysis results for a group. +type GoogleCloudAssuredworkloadsV1MoveAnalysisResult struct { + // Blockers: List of blockers. If not resolved, these will result in + // compliance violations in the target. + Blockers []*GoogleCloudAssuredworkloadsV1MoveImpact `json:"blockers,omitempty"` + + // Warnings: List of warnings. These are risks that may or may not + // result in compliance violations. + Warnings []*GoogleCloudAssuredworkloadsV1MoveImpact `json:"warnings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Blockers") 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. "Blockers") 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 *GoogleCloudAssuredworkloadsV1MoveAnalysisResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1MoveAnalysisResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1MoveImpact: Represents the impact of +// moving the asset to the target. +type GoogleCloudAssuredworkloadsV1MoveImpact struct { + // Detail: Explanation of the impact. + Detail string `json:"detail,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Detail") 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. "Detail") 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 *GoogleCloudAssuredworkloadsV1MoveImpact) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1MoveImpact + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest: Request // for updating permission settings for a partner workload. type GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest struct { @@ -1805,6 +1984,242 @@ func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f } } +// method id "assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove": + +type OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall struct { + s *Service + target string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AnalyzeWorkloadMove: Analyzes a hypothetical move of a source +// resource to a target workload to surface compliance risks. The +// analysis is best effort and is not guaranteed to be exhaustive. +// +// - target: The resource ID of the folder-based destination workload. +// This workload is where the source resource will hypothetically be +// moved to. Specify the workload's relative resource name, formatted +// as: +// "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{ +// WORKLOAD_ID}" For example: +// "organizations/123/locations/us-east1/workloads/assured-workload-2". +func (r *OrganizationsLocationsWorkloadsService) AnalyzeWorkloadMove(target string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c := &OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.target = target + return c +} + +// AssetTypes sets the optional parameter "assetTypes": List of asset +// types to be analyzed, including and under the source resource. If +// empty, all assets are analyzed. The complete list of asset types is +// available here +// (https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). +func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) AssetTypes(assetTypes ...string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c.urlParams_.SetMulti("assetTypes", append([]string{}, assetTypes...)) + return c +} + +// PageSize sets the optional parameter "pageSize": Page size. If a +// value is not specified, the default value of 10 is used. +func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token +// from the previous response. It needs to be passed in the second and +// following requests. +func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Project sets the optional parameter "project": The source type is a +// project. Specify the project's relative resource name, formatted as +// either a project number or a project ID: "projects/{PROJECT_NUMBER}" +// or "projects/{PROJECT_ID}" For example: "projects/951040570662" when +// specifying a project number, or "projects/my-project-123" when +// specifying a project ID. +func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Project(project string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c.urlParams_.Set("project", project) + 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 *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + 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 *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + 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 *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + 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 *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) 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/{+target}:analyzeWorkloadMove") + 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{ + "target": c.target, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse.ServerRespon +// se.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 *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse, 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 := &GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse{ + 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": "Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:analyzeWorkloadMove", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove", + // "parameterOrder": [ + // "target" + // ], + // "parameters": { + // "assetTypes": { + // "description": "Optional. List of asset types to be analyzed, including and under the source resource. If empty, all assets are analyzed. The complete list of asset types is available [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Page size. If a value is not specified, the default value of 10 is used.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. The page token from the previous response. It needs to be passed in the second and following requests.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: \"projects/{PROJECT_NUMBER}\" or \"projects/{PROJECT_ID}\" For example: \"projects/951040570662\" when specifying a project number, or \"projects/my-project-123\" when specifying a project ID.", + // "location": "query", + // "type": "string" + // }, + // "target": { + // "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+target}:analyzeWorkloadMove", + // "response": { + // "$ref": "GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse" + // }, + // "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 *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse) 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 "assuredworkloads.organizations.locations.workloads.create": type OrganizationsLocationsWorkloadsCreateCall struct { diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index 28b007570a5..c34371f95b2 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -1095,7 +1095,7 @@ } } }, - "revision": "20230902", + "revision": "20230908", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -2648,6 +2648,13 @@ "type": "string" }, "type": "array" + }, + "vpcNetworkSources": { + "description": "The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource" + }, + "type": "array" } }, "type": "object" @@ -2753,6 +2760,27 @@ "Authorize access from all service accounts outside the perimeter." ], "type": "string" + }, + "sourceRestriction": { + "description": "Whether to enforce traffic restrictions based on `sources` field. If the `sources` fields is non-empty, then this field must be set to `SOURCE_RESTRICTION_ENABLED`.", + "enum": [ + "SOURCE_RESTRICTION_UNSPECIFIED", + "SOURCE_RESTRICTION_ENABLED", + "SOURCE_RESTRICTION_DISABLED" + ], + "enumDescriptions": [ + "Enforcement preference unspecified, will not enforce traffic restrictions based on `sources` in EgressFrom.", + "Enforcement preference enabled, traffic restrictions will be enforced based on `sources` in EgressFrom.", + "Enforcement preference disabled, will not enforce traffic restrictions based on `sources` in EgressFrom." + ], + "type": "string" + }, + "sources": { + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" + }, + "type": "array" } }, "type": "object" @@ -2772,6 +2800,17 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1EgressSource": { + "description": "The source that EgressPolicy authorizes access from inside the ServicePerimeter to somewhere outside the ServicePerimeter boundaries.", + "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", + "properties": { + "accessLevel": { + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", + "type": "string" + } + }, + "type": "object" + }, "GoogleIdentityAccesscontextmanagerV1EgressTo": { "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", @@ -3047,6 +3086,35 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource": { + "description": "The originating network source in Google Cloud.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource", + "properties": { + "vpcSubnetwork": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "description": "Sub-segment ranges of a VPC network." + } + }, + "type": "object" + }, + "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork": { + "description": "Sub-segment ranges inside of a VPC Network.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "properties": { + "network": { + "description": "Required. Network name. If the network is not part of the organization, the `compute.network.get` permission must be granted to the caller. Format: `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWORK_NAME}` Example: `//compute.googleapis.com/projects/my-project/global/networks/network-1`", + "type": "string" + }, + "vpcIpSubnetworks": { + "description": "CIDR block IP subnetwork specification. The IP address must be an IPv4 address and can be a public or private IP address. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, \"192.0.2.0/24\" is accepted but \"192.0.2.1/24\" is not. If empty, all IP addresses are allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "IamPolicyAnalysis": { "description": "An analysis message to group the query and results.", "id": "IamPolicyAnalysis", diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index 2d177d6dbd8..3b550c8fc49 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -3329,6 +3329,11 @@ type GoogleIdentityAccesscontextmanagerV1Condition struct { // "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME" RequiredAccessLevels []string `json:"requiredAccessLevels,omitempty"` + // VpcNetworkSources: The request must originate from one of the + // provided VPC networks in Google Cloud. Cannot specify this field + // together with `ip_subnetworks`. + VpcNetworkSources []*GoogleIdentityAccesscontextmanagerV1VpcNetworkSource `json:"vpcNetworkSources,omitempty"` + // ForceSendFields is a list of field names (e.g. "DevicePolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3489,6 +3494,27 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { // outside the perimeter. IdentityType string `json:"identityType,omitempty"` + // SourceRestriction: Whether to enforce traffic restrictions based on + // `sources` field. If the `sources` fields is non-empty, then this + // field must be set to `SOURCE_RESTRICTION_ENABLED`. + // + // Possible values: + // "SOURCE_RESTRICTION_UNSPECIFIED" - Enforcement preference + // unspecified, will not enforce traffic restrictions based on `sources` + // in EgressFrom. + // "SOURCE_RESTRICTION_ENABLED" - Enforcement preference enabled, + // traffic restrictions will be enforced based on `sources` in + // EgressFrom. + // "SOURCE_RESTRICTION_DISABLED" - Enforcement preference disabled, + // will not enforce traffic restrictions based on `sources` in + // EgressFrom. + SourceRestriction string `json:"sourceRestriction,omitempty"` + + // Sources: Sources that this EgressPolicy authorizes access from. If + // this field is not empty, then `source_restriction` must be set to + // `SOURCE_RESTRICTION_ENABLED`. + Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` + // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3558,6 +3584,45 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1EgressSource: The source that +// EgressPolicy authorizes access from inside the ServicePerimeter to +// somewhere outside the ServicePerimeter boundaries. +type GoogleIdentityAccesscontextmanagerV1EgressSource struct { + // AccessLevel: An AccessLevel resource name that allows protected + // resources inside the ServicePerimeters to access outside the + // ServicePerimeter boundaries. AccessLevels listed must be in the same + // policy as this ServicePerimeter. Referencing a nonexistent + // AccessLevel will cause an error. If an AccessLevel name is not + // specified, only resources within the perimeter can be accessed + // through Google Cloud calls with request origins within the perimeter. + // Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a + // single `*` is specified for `access_level`, then all EgressSources + // will be allowed. + AccessLevel string `json:"accessLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessLevel") 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. "AccessLevel") 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 *GoogleIdentityAccesscontextmanagerV1EgressSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1EgressSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleIdentityAccesscontextmanagerV1EgressTo: Defines the conditions // under which an EgressPolicy matches a request. Conditions are based // on information about the ApiOperation intended to be performed on the @@ -4075,6 +4140,79 @@ func (s *GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating +// network source in Google Cloud. +type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { + // VpcSubnetwork: Sub-segment ranges of a VPC network. + VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") 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. "VpcSubnetwork") 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 *GoogleIdentityAccesscontextmanagerV1VpcNetworkSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcNetworkSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIdentityAccesscontextmanagerV1VpcSubNetwork: Sub-segment ranges +// inside of a VPC Network. +type GoogleIdentityAccesscontextmanagerV1VpcSubNetwork struct { + // Network: Required. Network name. If the network is not part of the + // organization, the `compute.network.get` permission must be granted to + // the caller. Format: + // `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWO + // RK_NAME}` Example: + // `//compute.googleapis.com/projects/my-project/global/networks/network- + // 1` + Network string `json:"network,omitempty"` + + // VpcIpSubnetworks: CIDR block IP subnetwork specification. The IP + // address must be an IPv4 address and can be a public or private IP + // address. Note that for a CIDR IP address block, the specified IP + // address portion must be properly truncated (i.e. all the host bits + // must be zero) or the input is considered malformed. For example, + // "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. If empty, all + // IP addresses are allowed. + VpcIpSubnetworks []string `json:"vpcIpSubnetworks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") 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. "Network") 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 *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcSubNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // IamPolicyAnalysis: An analysis message to group the query and // results. type IamPolicyAnalysis struct { diff --git a/cloudasset/v1beta1/cloudasset-api.json b/cloudasset/v1beta1/cloudasset-api.json index cc4702fc98b..09f3acbcfbd 100644 --- a/cloudasset/v1beta1/cloudasset-api.json +++ b/cloudasset/v1beta1/cloudasset-api.json @@ -411,7 +411,7 @@ } } }, - "revision": "20230902", + "revision": "20230908", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -1032,6 +1032,13 @@ "type": "string" }, "type": "array" + }, + "vpcNetworkSources": { + "description": "The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource" + }, + "type": "array" } }, "type": "object" @@ -1137,6 +1144,27 @@ "Authorize access from all service accounts outside the perimeter." ], "type": "string" + }, + "sourceRestriction": { + "description": "Whether to enforce traffic restrictions based on `sources` field. If the `sources` fields is non-empty, then this field must be set to `SOURCE_RESTRICTION_ENABLED`.", + "enum": [ + "SOURCE_RESTRICTION_UNSPECIFIED", + "SOURCE_RESTRICTION_ENABLED", + "SOURCE_RESTRICTION_DISABLED" + ], + "enumDescriptions": [ + "Enforcement preference unspecified, will not enforce traffic restrictions based on `sources` in EgressFrom.", + "Enforcement preference enabled, traffic restrictions will be enforced based on `sources` in EgressFrom.", + "Enforcement preference disabled, will not enforce traffic restrictions based on `sources` in EgressFrom." + ], + "type": "string" + }, + "sources": { + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" + }, + "type": "array" } }, "type": "object" @@ -1156,6 +1184,17 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1EgressSource": { + "description": "The source that EgressPolicy authorizes access from inside the ServicePerimeter to somewhere outside the ServicePerimeter boundaries.", + "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", + "properties": { + "accessLevel": { + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", + "type": "string" + } + }, + "type": "object" + }, "GoogleIdentityAccesscontextmanagerV1EgressTo": { "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", @@ -1431,6 +1470,35 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource": { + "description": "The originating network source in Google Cloud.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource", + "properties": { + "vpcSubnetwork": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "description": "Sub-segment ranges of a VPC network." + } + }, + "type": "object" + }, + "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork": { + "description": "Sub-segment ranges inside of a VPC Network.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "properties": { + "network": { + "description": "Required. Network name. If the network is not part of the organization, the `compute.network.get` permission must be granted to the caller. Format: `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWORK_NAME}` Example: `//compute.googleapis.com/projects/my-project/global/networks/network-1`", + "type": "string" + }, + "vpcIpSubnetworks": { + "description": "CIDR block IP subnetwork specification. The IP address must be an IPv4 address and can be a public or private IP address. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, \"192.0.2.0/24\" is accepted but \"192.0.2.1/24\" is not. If empty, all IP addresses are allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", diff --git a/cloudasset/v1beta1/cloudasset-gen.go b/cloudasset/v1beta1/cloudasset-gen.go index 35aba0ba50e..15a2716ab53 100644 --- a/cloudasset/v1beta1/cloudasset-gen.go +++ b/cloudasset/v1beta1/cloudasset-gen.go @@ -1499,6 +1499,11 @@ type GoogleIdentityAccesscontextmanagerV1Condition struct { // "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME" RequiredAccessLevels []string `json:"requiredAccessLevels,omitempty"` + // VpcNetworkSources: The request must originate from one of the + // provided VPC networks in Google Cloud. Cannot specify this field + // together with `ip_subnetworks`. + VpcNetworkSources []*GoogleIdentityAccesscontextmanagerV1VpcNetworkSource `json:"vpcNetworkSources,omitempty"` + // ForceSendFields is a list of field names (e.g. "DevicePolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1659,6 +1664,27 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { // outside the perimeter. IdentityType string `json:"identityType,omitempty"` + // SourceRestriction: Whether to enforce traffic restrictions based on + // `sources` field. If the `sources` fields is non-empty, then this + // field must be set to `SOURCE_RESTRICTION_ENABLED`. + // + // Possible values: + // "SOURCE_RESTRICTION_UNSPECIFIED" - Enforcement preference + // unspecified, will not enforce traffic restrictions based on `sources` + // in EgressFrom. + // "SOURCE_RESTRICTION_ENABLED" - Enforcement preference enabled, + // traffic restrictions will be enforced based on `sources` in + // EgressFrom. + // "SOURCE_RESTRICTION_DISABLED" - Enforcement preference disabled, + // will not enforce traffic restrictions based on `sources` in + // EgressFrom. + SourceRestriction string `json:"sourceRestriction,omitempty"` + + // Sources: Sources that this EgressPolicy authorizes access from. If + // this field is not empty, then `source_restriction` must be set to + // `SOURCE_RESTRICTION_ENABLED`. + Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` + // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1728,6 +1754,45 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1EgressSource: The source that +// EgressPolicy authorizes access from inside the ServicePerimeter to +// somewhere outside the ServicePerimeter boundaries. +type GoogleIdentityAccesscontextmanagerV1EgressSource struct { + // AccessLevel: An AccessLevel resource name that allows protected + // resources inside the ServicePerimeters to access outside the + // ServicePerimeter boundaries. AccessLevels listed must be in the same + // policy as this ServicePerimeter. Referencing a nonexistent + // AccessLevel will cause an error. If an AccessLevel name is not + // specified, only resources within the perimeter can be accessed + // through Google Cloud calls with request origins within the perimeter. + // Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a + // single `*` is specified for `access_level`, then all EgressSources + // will be allowed. + AccessLevel string `json:"accessLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessLevel") 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. "AccessLevel") 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 *GoogleIdentityAccesscontextmanagerV1EgressSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1EgressSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleIdentityAccesscontextmanagerV1EgressTo: Defines the conditions // under which an EgressPolicy matches a request. Conditions are based // on information about the ApiOperation intended to be performed on the @@ -2245,6 +2310,79 @@ func (s *GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating +// network source in Google Cloud. +type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { + // VpcSubnetwork: Sub-segment ranges of a VPC network. + VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") 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. "VpcSubnetwork") 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 *GoogleIdentityAccesscontextmanagerV1VpcNetworkSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcNetworkSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIdentityAccesscontextmanagerV1VpcSubNetwork: Sub-segment ranges +// inside of a VPC Network. +type GoogleIdentityAccesscontextmanagerV1VpcSubNetwork struct { + // Network: Required. Network name. If the network is not part of the + // organization, the `compute.network.get` permission must be granted to + // the caller. Format: + // `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWO + // RK_NAME}` Example: + // `//compute.googleapis.com/projects/my-project/global/networks/network- + // 1` + Network string `json:"network,omitempty"` + + // VpcIpSubnetworks: CIDR block IP subnetwork specification. The IP + // address must be an IPv4 address and can be a public or private IP + // address. Note that for a CIDR IP address block, the specified IP + // address portion must be properly truncated (i.e. all the host bits + // must be zero) or the input is considered malformed. For example, + // "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. If empty, all + // IP addresses are allowed. + VpcIpSubnetworks []string `json:"vpcIpSubnetworks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") 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. "Network") 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 *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcSubNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { diff --git a/cloudasset/v1p1beta1/cloudasset-api.json b/cloudasset/v1p1beta1/cloudasset-api.json index 775c2bb02a2..dcc8c65eded 100644 --- a/cloudasset/v1p1beta1/cloudasset-api.json +++ b/cloudasset/v1p1beta1/cloudasset-api.json @@ -207,7 +207,7 @@ } } }, - "revision": "20230902", + "revision": "20230908", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -734,6 +734,13 @@ "type": "string" }, "type": "array" + }, + "vpcNetworkSources": { + "description": "The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource" + }, + "type": "array" } }, "type": "object" @@ -839,6 +846,27 @@ "Authorize access from all service accounts outside the perimeter." ], "type": "string" + }, + "sourceRestriction": { + "description": "Whether to enforce traffic restrictions based on `sources` field. If the `sources` fields is non-empty, then this field must be set to `SOURCE_RESTRICTION_ENABLED`.", + "enum": [ + "SOURCE_RESTRICTION_UNSPECIFIED", + "SOURCE_RESTRICTION_ENABLED", + "SOURCE_RESTRICTION_DISABLED" + ], + "enumDescriptions": [ + "Enforcement preference unspecified, will not enforce traffic restrictions based on `sources` in EgressFrom.", + "Enforcement preference enabled, traffic restrictions will be enforced based on `sources` in EgressFrom.", + "Enforcement preference disabled, will not enforce traffic restrictions based on `sources` in EgressFrom." + ], + "type": "string" + }, + "sources": { + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" + }, + "type": "array" } }, "type": "object" @@ -858,6 +886,17 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1EgressSource": { + "description": "The source that EgressPolicy authorizes access from inside the ServicePerimeter to somewhere outside the ServicePerimeter boundaries.", + "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", + "properties": { + "accessLevel": { + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", + "type": "string" + } + }, + "type": "object" + }, "GoogleIdentityAccesscontextmanagerV1EgressTo": { "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", @@ -1133,6 +1172,35 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource": { + "description": "The originating network source in Google Cloud.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource", + "properties": { + "vpcSubnetwork": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "description": "Sub-segment ranges of a VPC network." + } + }, + "type": "object" + }, + "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork": { + "description": "Sub-segment ranges inside of a VPC Network.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "properties": { + "network": { + "description": "Required. Network name. If the network is not part of the organization, the `compute.network.get` permission must be granted to the caller. Format: `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWORK_NAME}` Example: `//compute.googleapis.com/projects/my-project/global/networks/network-1`", + "type": "string" + }, + "vpcIpSubnetworks": { + "description": "CIDR block IP subnetwork specification. The IP address must be an IPv4 address and can be a public or private IP address. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, \"192.0.2.0/24\" is accepted but \"192.0.2.1/24\" is not. If empty, all IP addresses are allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "IamPolicySearchResult": { "description": "The result for an IAM policy search.", "id": "IamPolicySearchResult", diff --git a/cloudasset/v1p1beta1/cloudasset-gen.go b/cloudasset/v1p1beta1/cloudasset-gen.go index 077f5be0710..d2449181c55 100644 --- a/cloudasset/v1p1beta1/cloudasset-gen.go +++ b/cloudasset/v1p1beta1/cloudasset-gen.go @@ -1281,6 +1281,11 @@ type GoogleIdentityAccesscontextmanagerV1Condition struct { // "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME" RequiredAccessLevels []string `json:"requiredAccessLevels,omitempty"` + // VpcNetworkSources: The request must originate from one of the + // provided VPC networks in Google Cloud. Cannot specify this field + // together with `ip_subnetworks`. + VpcNetworkSources []*GoogleIdentityAccesscontextmanagerV1VpcNetworkSource `json:"vpcNetworkSources,omitempty"` + // ForceSendFields is a list of field names (e.g. "DevicePolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1441,6 +1446,27 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { // outside the perimeter. IdentityType string `json:"identityType,omitempty"` + // SourceRestriction: Whether to enforce traffic restrictions based on + // `sources` field. If the `sources` fields is non-empty, then this + // field must be set to `SOURCE_RESTRICTION_ENABLED`. + // + // Possible values: + // "SOURCE_RESTRICTION_UNSPECIFIED" - Enforcement preference + // unspecified, will not enforce traffic restrictions based on `sources` + // in EgressFrom. + // "SOURCE_RESTRICTION_ENABLED" - Enforcement preference enabled, + // traffic restrictions will be enforced based on `sources` in + // EgressFrom. + // "SOURCE_RESTRICTION_DISABLED" - Enforcement preference disabled, + // will not enforce traffic restrictions based on `sources` in + // EgressFrom. + SourceRestriction string `json:"sourceRestriction,omitempty"` + + // Sources: Sources that this EgressPolicy authorizes access from. If + // this field is not empty, then `source_restriction` must be set to + // `SOURCE_RESTRICTION_ENABLED`. + Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` + // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1510,6 +1536,45 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1EgressSource: The source that +// EgressPolicy authorizes access from inside the ServicePerimeter to +// somewhere outside the ServicePerimeter boundaries. +type GoogleIdentityAccesscontextmanagerV1EgressSource struct { + // AccessLevel: An AccessLevel resource name that allows protected + // resources inside the ServicePerimeters to access outside the + // ServicePerimeter boundaries. AccessLevels listed must be in the same + // policy as this ServicePerimeter. Referencing a nonexistent + // AccessLevel will cause an error. If an AccessLevel name is not + // specified, only resources within the perimeter can be accessed + // through Google Cloud calls with request origins within the perimeter. + // Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a + // single `*` is specified for `access_level`, then all EgressSources + // will be allowed. + AccessLevel string `json:"accessLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessLevel") 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. "AccessLevel") 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 *GoogleIdentityAccesscontextmanagerV1EgressSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1EgressSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleIdentityAccesscontextmanagerV1EgressTo: Defines the conditions // under which an EgressPolicy matches a request. Conditions are based // on information about the ApiOperation intended to be performed on the @@ -2027,6 +2092,79 @@ func (s *GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating +// network source in Google Cloud. +type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { + // VpcSubnetwork: Sub-segment ranges of a VPC network. + VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") 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. "VpcSubnetwork") 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 *GoogleIdentityAccesscontextmanagerV1VpcNetworkSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcNetworkSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIdentityAccesscontextmanagerV1VpcSubNetwork: Sub-segment ranges +// inside of a VPC Network. +type GoogleIdentityAccesscontextmanagerV1VpcSubNetwork struct { + // Network: Required. Network name. If the network is not part of the + // organization, the `compute.network.get` permission must be granted to + // the caller. Format: + // `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWO + // RK_NAME}` Example: + // `//compute.googleapis.com/projects/my-project/global/networks/network- + // 1` + Network string `json:"network,omitempty"` + + // VpcIpSubnetworks: CIDR block IP subnetwork specification. The IP + // address must be an IPv4 address and can be a public or private IP + // address. Note that for a CIDR IP address block, the specified IP + // address portion must be properly truncated (i.e. all the host bits + // must be zero) or the input is considered malformed. For example, + // "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. If empty, all + // IP addresses are allowed. + VpcIpSubnetworks []string `json:"vpcIpSubnetworks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") 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. "Network") 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 *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcSubNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // IamPolicySearchResult: The result for an IAM policy search. type IamPolicySearchResult struct { // Explanation: Explanation about the IAM policy search result. It diff --git a/cloudasset/v1p5beta1/cloudasset-api.json b/cloudasset/v1p5beta1/cloudasset-api.json index 6689337fe46..e2754a9adb4 100644 --- a/cloudasset/v1p5beta1/cloudasset-api.json +++ b/cloudasset/v1p5beta1/cloudasset-api.json @@ -177,7 +177,7 @@ } } }, - "revision": "20230902", + "revision": "20230908", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -739,6 +739,13 @@ "type": "string" }, "type": "array" + }, + "vpcNetworkSources": { + "description": "The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource" + }, + "type": "array" } }, "type": "object" @@ -844,6 +851,27 @@ "Authorize access from all service accounts outside the perimeter." ], "type": "string" + }, + "sourceRestriction": { + "description": "Whether to enforce traffic restrictions based on `sources` field. If the `sources` fields is non-empty, then this field must be set to `SOURCE_RESTRICTION_ENABLED`.", + "enum": [ + "SOURCE_RESTRICTION_UNSPECIFIED", + "SOURCE_RESTRICTION_ENABLED", + "SOURCE_RESTRICTION_DISABLED" + ], + "enumDescriptions": [ + "Enforcement preference unspecified, will not enforce traffic restrictions based on `sources` in EgressFrom.", + "Enforcement preference enabled, traffic restrictions will be enforced based on `sources` in EgressFrom.", + "Enforcement preference disabled, will not enforce traffic restrictions based on `sources` in EgressFrom." + ], + "type": "string" + }, + "sources": { + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" + }, + "type": "array" } }, "type": "object" @@ -863,6 +891,17 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1EgressSource": { + "description": "The source that EgressPolicy authorizes access from inside the ServicePerimeter to somewhere outside the ServicePerimeter boundaries.", + "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", + "properties": { + "accessLevel": { + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", + "type": "string" + } + }, + "type": "object" + }, "GoogleIdentityAccesscontextmanagerV1EgressTo": { "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", @@ -1138,6 +1177,35 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource": { + "description": "The originating network source in Google Cloud.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource", + "properties": { + "vpcSubnetwork": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "description": "Sub-segment ranges of a VPC network." + } + }, + "type": "object" + }, + "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork": { + "description": "Sub-segment ranges inside of a VPC Network.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "properties": { + "network": { + "description": "Required. Network name. If the network is not part of the organization, the `compute.network.get` permission must be granted to the caller. Format: `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWORK_NAME}` Example: `//compute.googleapis.com/projects/my-project/global/networks/network-1`", + "type": "string" + }, + "vpcIpSubnetworks": { + "description": "CIDR block IP subnetwork specification. The IP address must be an IPv4 address and can be a public or private IP address. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, \"192.0.2.0/24\" is accepted but \"192.0.2.1/24\" is not. If empty, all IP addresses are allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListAssetsResponse": { "description": "ListAssets response.", "id": "ListAssetsResponse", diff --git a/cloudasset/v1p5beta1/cloudasset-gen.go b/cloudasset/v1p5beta1/cloudasset-gen.go index f9466497fdb..e5739640879 100644 --- a/cloudasset/v1p5beta1/cloudasset-gen.go +++ b/cloudasset/v1p5beta1/cloudasset-gen.go @@ -1322,6 +1322,11 @@ type GoogleIdentityAccesscontextmanagerV1Condition struct { // "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME" RequiredAccessLevels []string `json:"requiredAccessLevels,omitempty"` + // VpcNetworkSources: The request must originate from one of the + // provided VPC networks in Google Cloud. Cannot specify this field + // together with `ip_subnetworks`. + VpcNetworkSources []*GoogleIdentityAccesscontextmanagerV1VpcNetworkSource `json:"vpcNetworkSources,omitempty"` + // ForceSendFields is a list of field names (e.g. "DevicePolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1482,6 +1487,27 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { // outside the perimeter. IdentityType string `json:"identityType,omitempty"` + // SourceRestriction: Whether to enforce traffic restrictions based on + // `sources` field. If the `sources` fields is non-empty, then this + // field must be set to `SOURCE_RESTRICTION_ENABLED`. + // + // Possible values: + // "SOURCE_RESTRICTION_UNSPECIFIED" - Enforcement preference + // unspecified, will not enforce traffic restrictions based on `sources` + // in EgressFrom. + // "SOURCE_RESTRICTION_ENABLED" - Enforcement preference enabled, + // traffic restrictions will be enforced based on `sources` in + // EgressFrom. + // "SOURCE_RESTRICTION_DISABLED" - Enforcement preference disabled, + // will not enforce traffic restrictions based on `sources` in + // EgressFrom. + SourceRestriction string `json:"sourceRestriction,omitempty"` + + // Sources: Sources that this EgressPolicy authorizes access from. If + // this field is not empty, then `source_restriction` must be set to + // `SOURCE_RESTRICTION_ENABLED`. + Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` + // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1551,6 +1577,45 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1EgressSource: The source that +// EgressPolicy authorizes access from inside the ServicePerimeter to +// somewhere outside the ServicePerimeter boundaries. +type GoogleIdentityAccesscontextmanagerV1EgressSource struct { + // AccessLevel: An AccessLevel resource name that allows protected + // resources inside the ServicePerimeters to access outside the + // ServicePerimeter boundaries. AccessLevels listed must be in the same + // policy as this ServicePerimeter. Referencing a nonexistent + // AccessLevel will cause an error. If an AccessLevel name is not + // specified, only resources within the perimeter can be accessed + // through Google Cloud calls with request origins within the perimeter. + // Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a + // single `*` is specified for `access_level`, then all EgressSources + // will be allowed. + AccessLevel string `json:"accessLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessLevel") 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. "AccessLevel") 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 *GoogleIdentityAccesscontextmanagerV1EgressSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1EgressSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleIdentityAccesscontextmanagerV1EgressTo: Defines the conditions // under which an EgressPolicy matches a request. Conditions are based // on information about the ApiOperation intended to be performed on the @@ -2068,6 +2133,79 @@ func (s *GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating +// network source in Google Cloud. +type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { + // VpcSubnetwork: Sub-segment ranges of a VPC network. + VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") 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. "VpcSubnetwork") 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 *GoogleIdentityAccesscontextmanagerV1VpcNetworkSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcNetworkSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIdentityAccesscontextmanagerV1VpcSubNetwork: Sub-segment ranges +// inside of a VPC Network. +type GoogleIdentityAccesscontextmanagerV1VpcSubNetwork struct { + // Network: Required. Network name. If the network is not part of the + // organization, the `compute.network.get` permission must be granted to + // the caller. Format: + // `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWO + // RK_NAME}` Example: + // `//compute.googleapis.com/projects/my-project/global/networks/network- + // 1` + Network string `json:"network,omitempty"` + + // VpcIpSubnetworks: CIDR block IP subnetwork specification. The IP + // address must be an IPv4 address and can be a public or private IP + // address. Note that for a CIDR IP address block, the specified IP + // address portion must be properly truncated (i.e. all the host bits + // must be zero) or the input is considered malformed. For example, + // "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. If empty, all + // IP addresses are allowed. + VpcIpSubnetworks []string `json:"vpcIpSubnetworks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") 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. "Network") 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 *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcSubNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListAssetsResponse: ListAssets response. type ListAssetsResponse struct { // Assets: Assets. diff --git a/cloudasset/v1p7beta1/cloudasset-api.json b/cloudasset/v1p7beta1/cloudasset-api.json index 9633fe15a5e..756c7fdbf32 100644 --- a/cloudasset/v1p7beta1/cloudasset-api.json +++ b/cloudasset/v1p7beta1/cloudasset-api.json @@ -167,7 +167,7 @@ } } }, - "revision": "20230902", + "revision": "20230908", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -808,6 +808,13 @@ "type": "string" }, "type": "array" + }, + "vpcNetworkSources": { + "description": "The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource" + }, + "type": "array" } }, "type": "object" @@ -913,6 +920,27 @@ "Authorize access from all service accounts outside the perimeter." ], "type": "string" + }, + "sourceRestriction": { + "description": "Whether to enforce traffic restrictions based on `sources` field. If the `sources` fields is non-empty, then this field must be set to `SOURCE_RESTRICTION_ENABLED`.", + "enum": [ + "SOURCE_RESTRICTION_UNSPECIFIED", + "SOURCE_RESTRICTION_ENABLED", + "SOURCE_RESTRICTION_DISABLED" + ], + "enumDescriptions": [ + "Enforcement preference unspecified, will not enforce traffic restrictions based on `sources` in EgressFrom.", + "Enforcement preference enabled, traffic restrictions will be enforced based on `sources` in EgressFrom.", + "Enforcement preference disabled, will not enforce traffic restrictions based on `sources` in EgressFrom." + ], + "type": "string" + }, + "sources": { + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", + "items": { + "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" + }, + "type": "array" } }, "type": "object" @@ -932,6 +960,17 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1EgressSource": { + "description": "The source that EgressPolicy authorizes access from inside the ServicePerimeter to somewhere outside the ServicePerimeter boundaries.", + "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", + "properties": { + "accessLevel": { + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", + "type": "string" + } + }, + "type": "object" + }, "GoogleIdentityAccesscontextmanagerV1EgressTo": { "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", @@ -1207,6 +1246,35 @@ }, "type": "object" }, + "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource": { + "description": "The originating network source in Google Cloud.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcNetworkSource", + "properties": { + "vpcSubnetwork": { + "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "description": "Sub-segment ranges of a VPC network." + } + }, + "type": "object" + }, + "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork": { + "description": "Sub-segment ranges inside of a VPC Network.", + "id": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", + "properties": { + "network": { + "description": "Required. Network name. If the network is not part of the organization, the `compute.network.get` permission must be granted to the caller. Format: `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWORK_NAME}` Example: `//compute.googleapis.com/projects/my-project/global/networks/network-1`", + "type": "string" + }, + "vpcIpSubnetworks": { + "description": "CIDR block IP subnetwork specification. The IP address must be an IPv4 address and can be a public or private IP address. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, \"192.0.2.0/24\" is accepted but \"192.0.2.1/24\" is not. If empty, all IP addresses are allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", diff --git a/cloudasset/v1p7beta1/cloudasset-gen.go b/cloudasset/v1p7beta1/cloudasset-gen.go index 1d25d322345..f72ab79376d 100644 --- a/cloudasset/v1p7beta1/cloudasset-gen.go +++ b/cloudasset/v1p7beta1/cloudasset-gen.go @@ -1533,6 +1533,11 @@ type GoogleIdentityAccesscontextmanagerV1Condition struct { // "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME" RequiredAccessLevels []string `json:"requiredAccessLevels,omitempty"` + // VpcNetworkSources: The request must originate from one of the + // provided VPC networks in Google Cloud. Cannot specify this field + // together with `ip_subnetworks`. + VpcNetworkSources []*GoogleIdentityAccesscontextmanagerV1VpcNetworkSource `json:"vpcNetworkSources,omitempty"` + // ForceSendFields is a list of field names (e.g. "DevicePolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1693,6 +1698,27 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { // outside the perimeter. IdentityType string `json:"identityType,omitempty"` + // SourceRestriction: Whether to enforce traffic restrictions based on + // `sources` field. If the `sources` fields is non-empty, then this + // field must be set to `SOURCE_RESTRICTION_ENABLED`. + // + // Possible values: + // "SOURCE_RESTRICTION_UNSPECIFIED" - Enforcement preference + // unspecified, will not enforce traffic restrictions based on `sources` + // in EgressFrom. + // "SOURCE_RESTRICTION_ENABLED" - Enforcement preference enabled, + // traffic restrictions will be enforced based on `sources` in + // EgressFrom. + // "SOURCE_RESTRICTION_DISABLED" - Enforcement preference disabled, + // will not enforce traffic restrictions based on `sources` in + // EgressFrom. + SourceRestriction string `json:"sourceRestriction,omitempty"` + + // Sources: Sources that this EgressPolicy authorizes access from. If + // this field is not empty, then `source_restriction` must be set to + // `SOURCE_RESTRICTION_ENABLED`. + Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` + // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1762,6 +1788,45 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1EgressSource: The source that +// EgressPolicy authorizes access from inside the ServicePerimeter to +// somewhere outside the ServicePerimeter boundaries. +type GoogleIdentityAccesscontextmanagerV1EgressSource struct { + // AccessLevel: An AccessLevel resource name that allows protected + // resources inside the ServicePerimeters to access outside the + // ServicePerimeter boundaries. AccessLevels listed must be in the same + // policy as this ServicePerimeter. Referencing a nonexistent + // AccessLevel will cause an error. If an AccessLevel name is not + // specified, only resources within the perimeter can be accessed + // through Google Cloud calls with request origins within the perimeter. + // Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a + // single `*` is specified for `access_level`, then all EgressSources + // will be allowed. + AccessLevel string `json:"accessLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessLevel") 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. "AccessLevel") 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 *GoogleIdentityAccesscontextmanagerV1EgressSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1EgressSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleIdentityAccesscontextmanagerV1EgressTo: Defines the conditions // under which an EgressPolicy matches a request. Conditions are based // on information about the ApiOperation intended to be performed on the @@ -2279,6 +2344,79 @@ func (s *GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating +// network source in Google Cloud. +type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { + // VpcSubnetwork: Sub-segment ranges of a VPC network. + VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") 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. "VpcSubnetwork") 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 *GoogleIdentityAccesscontextmanagerV1VpcNetworkSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcNetworkSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIdentityAccesscontextmanagerV1VpcSubNetwork: Sub-segment ranges +// inside of a VPC Network. +type GoogleIdentityAccesscontextmanagerV1VpcSubNetwork struct { + // Network: Required. Network name. If the network is not part of the + // organization, the `compute.network.get` permission must be granted to + // the caller. Format: + // `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NETWO + // RK_NAME}` Example: + // `//compute.googleapis.com/projects/my-project/global/networks/network- + // 1` + Network string `json:"network,omitempty"` + + // VpcIpSubnetworks: CIDR block IP subnetwork specification. The IP + // address must be an IPv4 address and can be a public or private IP + // address. Note that for a CIDR IP address block, the specified IP + // address portion must be properly truncated (i.e. all the host bits + // must be zero) or the input is considered malformed. For example, + // "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. If empty, all + // IP addresses are allowed. + VpcIpSubnetworks []string `json:"vpcIpSubnetworks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") 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. "Network") 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 *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIdentityAccesscontextmanagerV1VpcSubNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { diff --git a/cloudbuild/v1/cloudbuild-api.json b/cloudbuild/v1/cloudbuild-api.json index f162d1be432..b7c3fec9009 100644 --- a/cloudbuild/v1/cloudbuild-api.json +++ b/cloudbuild/v1/cloudbuild-api.json @@ -1582,7 +1582,7 @@ "triggers": { "methods": { "create": { - "description": "Creates a new `BuildTrigger`. This API is experimental.", + "description": "Creates a new `BuildTrigger`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers", "httpMethod": "POST", "id": "cloudbuild.projects.locations.triggers.create", @@ -1615,7 +1615,7 @@ ] }, "delete": { - "description": "Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + "description": "Deletes a `BuildTrigger` by its project ID and trigger ID.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}", "httpMethod": "DELETE", "id": "cloudbuild.projects.locations.triggers.delete", @@ -1650,7 +1650,7 @@ ] }, "get": { - "description": "Returns information about a `BuildTrigger`. This API is experimental.", + "description": "Returns information about a `BuildTrigger`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}", "httpMethod": "GET", "id": "cloudbuild.projects.locations.triggers.get", @@ -1685,7 +1685,7 @@ ] }, "list": { - "description": "Lists existing `BuildTrigger`s. This API is experimental.", + "description": "Lists existing `BuildTrigger`s.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers", "httpMethod": "GET", "id": "cloudbuild.projects.locations.triggers.list", @@ -1726,7 +1726,7 @@ ] }, "patch": { - "description": "Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + "description": "Updates a `BuildTrigger` by its project ID and trigger ID.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}", "httpMethod": "PATCH", "id": "cloudbuild.projects.locations.triggers.patch", @@ -2026,7 +2026,7 @@ "triggers": { "methods": { "create": { - "description": "Creates a new `BuildTrigger`. This API is experimental.", + "description": "Creates a new `BuildTrigger`.", "flatPath": "v1/projects/{projectId}/triggers", "httpMethod": "POST", "id": "cloudbuild.projects.triggers.create", @@ -2058,7 +2058,7 @@ ] }, "delete": { - "description": "Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + "description": "Deletes a `BuildTrigger` by its project ID and trigger ID.", "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", "httpMethod": "DELETE", "id": "cloudbuild.projects.triggers.delete", @@ -2094,7 +2094,7 @@ ] }, "get": { - "description": "Returns information about a `BuildTrigger`. This API is experimental.", + "description": "Returns information about a `BuildTrigger`.", "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", "httpMethod": "GET", "id": "cloudbuild.projects.triggers.get", @@ -2130,7 +2130,7 @@ ] }, "list": { - "description": "Lists existing `BuildTrigger`s. This API is experimental.", + "description": "Lists existing `BuildTrigger`s.", "flatPath": "v1/projects/{projectId}/triggers", "httpMethod": "GET", "id": "cloudbuild.projects.triggers.list", @@ -2170,7 +2170,7 @@ ] }, "patch": { - "description": "Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + "description": "Updates a `BuildTrigger` by its project ID and trigger ID.", "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", "httpMethod": "PATCH", "id": "cloudbuild.projects.triggers.patch", @@ -2319,7 +2319,7 @@ } } }, - "revision": "20230811", + "revision": "20230907", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -4783,7 +4783,7 @@ "type": "array" }, "buildStepOutputs": { - "description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.", + "description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data is stored.", "items": { "format": "byte", "type": "string" diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index 80f1bb4145f..ab4b1575645 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -4266,7 +4266,7 @@ type Results struct { // images, in the order corresponding to build step indices. Cloud // Builders (https://cloud.google.com/cloud-build/docs/cloud-builders) // can produce this output by writing to `$BUILDER_OUTPUT/output`. Only - // the first 4KB of data is stored. + // the first 50KB of data is stored. BuildStepOutputs []string `json:"buildStepOutputs,omitempty"` // Images: Container images that were built as a part of the build. @@ -12415,7 +12415,7 @@ type ProjectsLocationsTriggersCreateCall struct { header_ http.Header } -// Create: Creates a new `BuildTrigger`. This API is experimental. +// Create: Creates a new `BuildTrigger`. // // - parent: The parent resource where this trigger will be created. // Format: `projects/{project}/locations/{location}`. @@ -12524,7 +12524,7 @@ func (c *ProjectsLocationsTriggersCreateCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Creates a new `BuildTrigger`. This API is experimental.", + // "description": "Creates a new `BuildTrigger`.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers", // "httpMethod": "POST", // "id": "cloudbuild.projects.locations.triggers.create", @@ -12570,7 +12570,6 @@ type ProjectsLocationsTriggersDeleteCall struct { } // Delete: Deletes a `BuildTrigger` by its project ID and trigger ID. -// This API is experimental. // // - name: The name of the `Trigger` to delete. Format: // `projects/{project}/locations/{location}/triggers/{trigger}`. @@ -12680,7 +12679,7 @@ func (c *ProjectsLocationsTriggersDeleteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + // "description": "Deletes a `BuildTrigger` by its project ID and trigger ID.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}", // "httpMethod": "DELETE", // "id": "cloudbuild.projects.locations.triggers.delete", @@ -12728,8 +12727,7 @@ type ProjectsLocationsTriggersGetCall struct { header_ http.Header } -// Get: Returns information about a `BuildTrigger`. This API is -// experimental. +// Get: Returns information about a `BuildTrigger`. // // - name: The name of the `Trigger` to retrieve. Format: // `projects/{project}/locations/{location}/triggers/{trigger}`. @@ -12852,7 +12850,7 @@ func (c *ProjectsLocationsTriggersGetCall) Do(opts ...googleapi.CallOption) (*Bu } return ret, nil // { - // "description": "Returns information about a `BuildTrigger`. This API is experimental.", + // "description": "Returns information about a `BuildTrigger`.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}", // "httpMethod": "GET", // "id": "cloudbuild.projects.locations.triggers.get", @@ -12900,7 +12898,7 @@ type ProjectsLocationsTriggersListCall struct { header_ http.Header } -// List: Lists existing `BuildTrigger`s. This API is experimental. +// List: Lists existing `BuildTrigger`s. // // - parent: The parent of the collection of `Triggers`. Format: // `projects/{project}/locations/{location}`. @@ -13030,7 +13028,7 @@ func (c *ProjectsLocationsTriggersListCall) Do(opts ...googleapi.CallOption) (*L } return ret, nil // { - // "description": "Lists existing `BuildTrigger`s. This API is experimental.", + // "description": "Lists existing `BuildTrigger`s.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers", // "httpMethod": "GET", // "id": "cloudbuild.projects.locations.triggers.list", @@ -13106,7 +13104,6 @@ type ProjectsLocationsTriggersPatchCall struct { } // Patch: Updates a `BuildTrigger` by its project ID and trigger ID. -// This API is experimental. // // - resourceName: The `Trigger` name with format: // `projects/{project}/locations/{location}/triggers/{trigger}`, where @@ -13232,7 +13229,7 @@ func (c *ProjectsLocationsTriggersPatchCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + // "description": "Updates a `BuildTrigger` by its project ID and trigger ID.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}", // "httpMethod": "PATCH", // "id": "cloudbuild.projects.locations.triggers.patch", @@ -14470,7 +14467,7 @@ type ProjectsTriggersCreateCall struct { header_ http.Header } -// Create: Creates a new `BuildTrigger`. This API is experimental. +// Create: Creates a new `BuildTrigger`. // // - projectId: ID of the project for which to configure automatic // builds. @@ -14580,7 +14577,7 @@ func (c *ProjectsTriggersCreateCall) Do(opts ...googleapi.CallOption) (*BuildTri } return ret, nil // { - // "description": "Creates a new `BuildTrigger`. This API is experimental.", + // "description": "Creates a new `BuildTrigger`.", // "flatPath": "v1/projects/{projectId}/triggers", // "httpMethod": "POST", // "id": "cloudbuild.projects.triggers.create", @@ -14626,7 +14623,6 @@ type ProjectsTriggersDeleteCall struct { } // Delete: Deletes a `BuildTrigger` by its project ID and trigger ID. -// This API is experimental. // // - projectId: ID of the project that owns the trigger. // - triggerId: ID of the `BuildTrigger` to delete. @@ -14732,7 +14728,7 @@ func (c *ProjectsTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, e } return ret, nil // { - // "description": "Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + // "description": "Deletes a `BuildTrigger` by its project ID and trigger ID.", // "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", // "httpMethod": "DELETE", // "id": "cloudbuild.projects.triggers.delete", @@ -14782,8 +14778,7 @@ type ProjectsTriggersGetCall struct { header_ http.Header } -// Get: Returns information about a `BuildTrigger`. This API is -// experimental. +// Get: Returns information about a `BuildTrigger`. // // - projectId: ID of the project that owns the trigger. // - triggerId: Identifier (`id` or `name`) of the `BuildTrigger` to @@ -14903,7 +14898,7 @@ func (c *ProjectsTriggersGetCall) Do(opts ...googleapi.CallOption) (*BuildTrigge } return ret, nil // { - // "description": "Returns information about a `BuildTrigger`. This API is experimental.", + // "description": "Returns information about a `BuildTrigger`.", // "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", // "httpMethod": "GET", // "id": "cloudbuild.projects.triggers.get", @@ -14952,7 +14947,7 @@ type ProjectsTriggersListCall struct { header_ http.Header } -// List: Lists existing `BuildTrigger`s. This API is experimental. +// List: Lists existing `BuildTrigger`s. // // - projectId: ID of the project for which to list BuildTriggers. func (r *ProjectsTriggersService) List(projectId string) *ProjectsTriggersListCall { @@ -15082,7 +15077,7 @@ func (c *ProjectsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListBuildT } return ret, nil // { - // "description": "Lists existing `BuildTrigger`s. This API is experimental.", + // "description": "Lists existing `BuildTrigger`s.", // "flatPath": "v1/projects/{projectId}/triggers", // "httpMethod": "GET", // "id": "cloudbuild.projects.triggers.list", @@ -15158,7 +15153,6 @@ type ProjectsTriggersPatchCall struct { } // Patch: Updates a `BuildTrigger` by its project ID and trigger ID. -// This API is experimental. // // - projectId: ID of the project that owns the trigger. // - triggerId: ID of the `BuildTrigger` to update. @@ -15271,7 +15265,7 @@ func (c *ProjectsTriggersPatchCall) Do(opts ...googleapi.CallOption) (*BuildTrig } return ret, nil // { - // "description": "Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + // "description": "Updates a `BuildTrigger` by its project ID and trigger ID.", // "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", // "httpMethod": "PATCH", // "id": "cloudbuild.projects.triggers.patch", diff --git a/cloudbuild/v2/cloudbuild-api.json b/cloudbuild/v2/cloudbuild-api.json index d35d9048c3c..0416f0dd380 100644 --- a/cloudbuild/v2/cloudbuild-api.json +++ b/cloudbuild/v2/cloudbuild-api.json @@ -108,6 +108,74 @@ "projects": { "resources": { "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v2/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "connections": { "methods": { @@ -776,7 +844,7 @@ } } }, - "revision": "20230811", + "revision": "20230907", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "AuditConfig": { @@ -899,13 +967,11 @@ "description": "Output only. Type of the child reference.", "enum": [ "TYPE_UNSPECIFIED", - "TASK_RUN", - "CUSTOM_RUN" + "TASK_RUN" ], "enumDescriptions": [ "Default enum type; should not be used.", - "TaskRun.", - "CustomRun." + "TaskRun." ], "readOnly": true, "type": "string" @@ -1437,6 +1503,24 @@ }, "type": "object" }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, "ListRepositoriesResponse": { "description": "Message for response to listing Repositories.", "id": "ListRepositoriesResponse", @@ -1455,6 +1539,40 @@ }, "type": "object" }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, "OAuthCredential": { "description": "Represents an OAuth token of the account that authorized the Connection, and associated metadata.", "id": "OAuthCredential", @@ -1809,6 +1927,11 @@ }, "type": "array" }, + "generatedYaml": { + "description": "Output only. auto-generated yaml that is output only for display purpose for workflows using pipeline_spec, used by UI/gcloud cli for Workflows.", + "readOnly": true, + "type": "string" + }, "params": { "description": "List of parameters.", "items": { @@ -2254,18 +2377,6 @@ "description": "TaskRef can be used to refer to a specific instance of a task. PipelineRef can be used to refer to a specific instance of a Pipeline.", "id": "TaskRef", "properties": { - "customTask": { - "description": "Optional. The CustomTask definition to use.", - "enum": [ - "CUSTOM_TASK_UNSPECIFIED", - "DOCKER" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "Sets up a Docker Daemon." - ], - "type": "string" - }, "name": { "deprecated": true, "description": "Name of the task.", diff --git a/cloudbuild/v2/cloudbuild-gen.go b/cloudbuild/v2/cloudbuild-gen.go index 04845ff7a22..ecb9070da13 100644 --- a/cloudbuild/v2/cloudbuild-gen.go +++ b/cloudbuild/v2/cloudbuild-gen.go @@ -462,7 +462,6 @@ type ChildStatusReference struct { // Possible values: // "TYPE_UNSPECIFIED" - Default enum type; should not be used. // "TASK_RUN" - TaskRun. - // "CUSTOM_RUN" - CustomRun. Type string `json:"type,omitempty"` // WhenExpressions: WhenExpressions is the list of checks guarding the @@ -1342,6 +1341,43 @@ func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListRepositoriesResponse: Message for response to listing // Repositories. type ListRepositoriesResponse struct { @@ -1379,6 +1415,56 @@ func (s *ListRepositoriesResponse) MarshalJSON() ([]byte, error) { 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"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OAuthCredential: Represents an OAuth token of the account that // authorized the Connection, and associated metadata. type OAuthCredential struct { @@ -1805,6 +1891,11 @@ type PipelineSpec struct { // Pipeline. FinallyTasks []*PipelineTask `json:"finallyTasks,omitempty"` + // GeneratedYaml: Output only. auto-generated yaml that is output only + // for display purpose for workflows using pipeline_spec, used by + // UI/gcloud cli for Workflows. + GeneratedYaml string `json:"generatedYaml,omitempty"` + // Params: List of parameters. Params []*ParamSpec `json:"params,omitempty"` @@ -2472,13 +2563,6 @@ func (s *Step) MarshalJSON() ([]byte, error) { // task. PipelineRef can be used to refer to a specific instance of a // Pipeline. type TaskRef struct { - // CustomTask: Optional. The CustomTask definition to use. - // - // Possible values: - // "CUSTOM_TASK_UNSPECIFIED" - Default value. This value is unused. - // "DOCKER" - Sets up a Docker Daemon. - CustomTask string `json:"customTask,omitempty"` - // Name: Name of the task. Name string `json:"name,omitempty"` @@ -2501,7 +2585,7 @@ type TaskRef struct { // https://tekton.dev/docs/pipelines/git-resolver/ Resolver string `json:"resolver,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomTask") to + // ForceSendFields is a list of field names (e.g. "Name") 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 @@ -2509,8 +2593,8 @@ type TaskRef struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomTask") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Name") 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. @@ -3033,6 +3117,361 @@ func (s *WorkspacePipelineTaskBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "cloudbuild.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) 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, "v2/{+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 "cloudbuild.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{ + 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 information about a location.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) 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, "v2/{+name}/locations") + 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 "cloudbuild.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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 := &ListLocationsResponse{ + 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 information about the supported locations for this service.", + // "flatPath": "v2/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) 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 "cloudbuild.projects.locations.connections.create": type ProjectsLocationsConnectionsCreateCall struct { diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index 94e53314f7d..a10ae2f444d 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -448,6 +448,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "rollbackTarget": { + "description": "Creates a `Rollout` to roll back the specified target.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deliveryPipelines/{deliveryPipelinesId}:rollbackTarget", + "httpMethod": "POST", + "id": "clouddeploy.projects.locations.deliveryPipelines.rollbackTarget", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The `DeliveryPipeline` for which the rollback `Rollout` should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deliveryPipelines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:rollbackTarget", + "request": { + "$ref": "RollbackTargetRequest" + }, + "response": { + "$ref": "RollbackTargetResponse" + }, + "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}/deliveryPipelines/{deliveryPipelinesId}:setIamPolicy", @@ -1451,7 +1479,7 @@ } } }, - "revision": "20230802", + "revision": "20230904", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -3384,6 +3412,63 @@ "properties": {}, "type": "object" }, + "RollbackTargetConfig": { + "description": "Configs for the Rollback rollout.", + "id": "RollbackTargetConfig", + "properties": { + "rollout": { + "$ref": "Rollout", + "description": "Optional. The rollback `Rollout` to create." + }, + "startingPhaseId": { + "description": "Optional. The starting phase ID for the `Rollout`. If unspecified, the `Rollout` will start in the stable phase.", + "type": "string" + } + }, + "type": "object" + }, + "RollbackTargetRequest": { + "description": "The request object for `RollbackTarget`.", + "id": "RollbackTargetRequest", + "properties": { + "releaseId": { + "description": "Optional. ID of the `Release` to roll back to. If this isn't specified, the previous successful `Rollout` to the specified target will be used to determine the `Release`.", + "type": "string" + }, + "rollbackConfig": { + "$ref": "RollbackTargetConfig", + "description": "Optional. Configs for the rollback `Rollout`." + }, + "rolloutId": { + "description": "Required. ID of the rollback `Rollout` to create.", + "type": "string" + }, + "rolloutToRollBack": { + "description": "Optional. If provided, this must be the latest `Rollout` that is on the `Target`.", + "type": "string" + }, + "targetId": { + "description": "Required. ID of the `Target` that is being rolled back.", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set to true, the request is validated and the user is provided with a `RollbackTargetResponse`.", + "type": "boolean" + } + }, + "type": "object" + }, + "RollbackTargetResponse": { + "description": "The response object from `RollbackTarget`.", + "id": "RollbackTargetResponse", + "properties": { + "rollbackConfig": { + "$ref": "RollbackTargetConfig", + "description": "The config of the rollback `Rollout` created or will be created." + } + }, + "type": "object" + }, "Rollout": { "description": "A `Rollout` resource in the Cloud Deploy API. A `Rollout` contains information around a specific deployment to a `Target`.", "id": "Rollout", @@ -3516,6 +3601,19 @@ "readOnly": true, "type": "array" }, + "rollbackOfRollout": { + "description": "Output only. Name of the `Rollout` that is rolled back by this `Rollout`. Empty if this `Rollout` wasn't created as a rollback.", + "readOnly": true, + "type": "string" + }, + "rolledBackByRollouts": { + "description": "Output only. Names of `Rollouts` that rolled back this `Rollout`.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "state": { "description": "Output only. Current state of the `Rollout`.", "enum": [ diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index c1aee8ce6a3..d1e87dcfe51 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -3370,6 +3370,119 @@ type RetryJobResponse struct { googleapi.ServerResponse `json:"-"` } +// RollbackTargetConfig: Configs for the Rollback rollout. +type RollbackTargetConfig struct { + // Rollout: Optional. The rollback `Rollout` to create. + Rollout *Rollout `json:"rollout,omitempty"` + + // StartingPhaseId: Optional. The starting phase ID for the `Rollout`. + // If unspecified, the `Rollout` will start in the stable phase. + StartingPhaseId string `json:"startingPhaseId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Rollout") 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. "Rollout") 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 *RollbackTargetConfig) MarshalJSON() ([]byte, error) { + type NoMethod RollbackTargetConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RollbackTargetRequest: The request object for `RollbackTarget`. +type RollbackTargetRequest struct { + // ReleaseId: Optional. ID of the `Release` to roll back to. If this + // isn't specified, the previous successful `Rollout` to the specified + // target will be used to determine the `Release`. + ReleaseId string `json:"releaseId,omitempty"` + + // RollbackConfig: Optional. Configs for the rollback `Rollout`. + RollbackConfig *RollbackTargetConfig `json:"rollbackConfig,omitempty"` + + // RolloutId: Required. ID of the rollback `Rollout` to create. + RolloutId string `json:"rolloutId,omitempty"` + + // RolloutToRollBack: Optional. If provided, this must be the latest + // `Rollout` that is on the `Target`. + RolloutToRollBack string `json:"rolloutToRollBack,omitempty"` + + // TargetId: Required. ID of the `Target` that is being rolled back. + TargetId string `json:"targetId,omitempty"` + + // ValidateOnly: Optional. If set to true, the request is validated and + // the user is provided with a `RollbackTargetResponse`. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ReleaseId") 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. "ReleaseId") 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 *RollbackTargetRequest) MarshalJSON() ([]byte, error) { + type NoMethod RollbackTargetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RollbackTargetResponse: The response object from `RollbackTarget`. +type RollbackTargetResponse struct { + // RollbackConfig: The config of the rollback `Rollout` created or will + // be created. + RollbackConfig *RollbackTargetConfig `json:"rollbackConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "RollbackConfig") 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. "RollbackConfig") 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 *RollbackTargetResponse) MarshalJSON() ([]byte, error) { + type NoMethod RollbackTargetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Rollout: A `Rollout` resource in the Cloud Deploy API. A `Rollout` // contains information around a specific deployment to a `Target`. type Rollout struct { @@ -3476,6 +3589,15 @@ type Rollout struct { // `Rollout`. Phases []*Phase `json:"phases,omitempty"` + // RollbackOfRollout: Output only. Name of the `Rollout` that is rolled + // back by this `Rollout`. Empty if this `Rollout` wasn't created as a + // rollback. + RollbackOfRollout string `json:"rollbackOfRollout,omitempty"` + + // RolledBackByRollouts: Output only. Names of `Rollouts` that rolled + // back this `Rollout`. + RolledBackByRollouts []string `json:"rolledBackByRollouts,omitempty"` + // State: Output only. Current state of the `Rollout`. // // Possible values: @@ -6112,6 +6234,152 @@ func (c *ProjectsLocationsDeliveryPipelinesPatchCall) Do(opts ...googleapi.CallO } +// method id "clouddeploy.projects.locations.deliveryPipelines.rollbackTarget": + +type ProjectsLocationsDeliveryPipelinesRollbackTargetCall struct { + s *Service + name string + rollbacktargetrequest *RollbackTargetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RollbackTarget: Creates a `Rollout` to roll back the specified +// target. +// +// - name: The `DeliveryPipeline` for which the rollback `Rollout` +// should be created. Format should be +// projects/{project_id}/locations/{location_name}/deliveryPipelines/{p +// ipeline_name}. +func (r *ProjectsLocationsDeliveryPipelinesService) RollbackTarget(name string, rollbacktargetrequest *RollbackTargetRequest) *ProjectsLocationsDeliveryPipelinesRollbackTargetCall { + c := &ProjectsLocationsDeliveryPipelinesRollbackTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rollbacktargetrequest = rollbacktargetrequest + 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 *ProjectsLocationsDeliveryPipelinesRollbackTargetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeliveryPipelinesRollbackTargetCall { + 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 *ProjectsLocationsDeliveryPipelinesRollbackTargetCall) Context(ctx context.Context) *ProjectsLocationsDeliveryPipelinesRollbackTargetCall { + 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 *ProjectsLocationsDeliveryPipelinesRollbackTargetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeliveryPipelinesRollbackTargetCall) 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.rollbacktargetrequest) + 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}:rollbackTarget") + 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 "clouddeploy.projects.locations.deliveryPipelines.rollbackTarget" call. +// Exactly one of *RollbackTargetResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *RollbackTargetResponse.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 *ProjectsLocationsDeliveryPipelinesRollbackTargetCall) Do(opts ...googleapi.CallOption) (*RollbackTargetResponse, 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 := &RollbackTargetResponse{ + 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 `Rollout` to roll back the specified target.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deliveryPipelines/{deliveryPipelinesId}:rollbackTarget", + // "httpMethod": "POST", + // "id": "clouddeploy.projects.locations.deliveryPipelines.rollbackTarget", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The `DeliveryPipeline` for which the rollback `Rollout` should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deliveryPipelines/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:rollbackTarget", + // "request": { + // "$ref": "RollbackTargetRequest" + // }, + // "response": { + // "$ref": "RollbackTargetResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "clouddeploy.projects.locations.deliveryPipelines.setIamPolicy": type ProjectsLocationsDeliveryPipelinesSetIamPolicyCall struct { diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json index a92f8d76933..faea5f289c9 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json @@ -512,7 +512,7 @@ } } }, - "revision": "20230823", + "revision": "20230907", "rootUrl": "https://contactcenteraiplatform.googleapis.com/", "schemas": { "AdminUser": { @@ -962,6 +962,10 @@ "description": "SAML certificate", "type": "string" }, + "emailMapping": { + "description": "IdP field that maps to the user’s email address", + "type": "string" + }, "entityId": { "description": "Entity id URL", "type": "string" diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go index ef670153308..52b12f76400 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go @@ -801,6 +801,9 @@ type SAMLParams struct { // Certificate: SAML certificate Certificate string `json:"certificate,omitempty"` + // EmailMapping: IdP field that maps to the user’s email address + EmailMapping string `json:"emailMapping,omitempty"` + // EntityId: Entity id URL EntityId string `json:"entityId,omitempty"` diff --git a/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json index 6e0b9936bf5..2c599dbf236 100644 --- a/metastore/v1/metastore-api.json +++ b/metastore/v1/metastore-api.json @@ -1339,7 +1339,7 @@ } } }, - "revision": "20230807", + "revision": "20230905", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1552,6 +1552,11 @@ "description": "Contains information of the customer's network configurations.Next available ID: 5", "id": "Consumer", "properties": { + "endpointLocation": { + "description": "Output only. The location of the endpoint URI. Format: projects/{project}/locations/{location}.", + "readOnly": true, + "type": "string" + }, "endpointUri": { "description": "Output only. The URI of the endpoint used to access the metastore service.", "readOnly": true, diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index 6befe1ebbe4..4f36a1e5e62 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -601,6 +601,10 @@ type CancelOperationRequest struct { // Consumer: Contains information of the customer's network // configurations.Next available ID: 5 type Consumer struct { + // EndpointLocation: Output only. The location of the endpoint URI. + // Format: projects/{project}/locations/{location}. + EndpointLocation string `json:"endpointLocation,omitempty"` + // EndpointUri: Output only. The URI of the endpoint used to access the // metastore service. EndpointUri string `json:"endpointUri,omitempty"` @@ -615,7 +619,7 @@ type Consumer struct { // work_id} Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // ForceSendFields is a list of field names (e.g. "EndpointLocation") 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 @@ -623,12 +627,13 @@ type Consumer struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndpointUri") 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. "EndpointLocation") 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/metastore/v1alpha/metastore-api.json b/metastore/v1alpha/metastore-api.json index 5df86b7eb07..847fbfe098b 100644 --- a/metastore/v1alpha/metastore-api.json +++ b/metastore/v1alpha/metastore-api.json @@ -1579,7 +1579,7 @@ } } }, - "revision": "20230807", + "revision": "20230905", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1794,6 +1794,11 @@ "description": "Contains information of the customer's network configurations.Next available ID: 5", "id": "Consumer", "properties": { + "endpointLocation": { + "description": "Output only. The location of the endpoint URI. Format: projects/{project}/locations/{location}.", + "readOnly": true, + "type": "string" + }, "endpointUri": { "description": "Output only. The URI of the endpoint used to access the metastore service.", "readOnly": true, diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index bde730d97a3..ccacfd85286 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -626,6 +626,10 @@ type CancelOperationRequest struct { // Consumer: Contains information of the customer's network // configurations.Next available ID: 5 type Consumer struct { + // EndpointLocation: Output only. The location of the endpoint URI. + // Format: projects/{project}/locations/{location}. + EndpointLocation string `json:"endpointLocation,omitempty"` + // EndpointUri: Output only. The URI of the endpoint used to access the // metastore service. EndpointUri string `json:"endpointUri,omitempty"` @@ -640,7 +644,7 @@ type Consumer struct { // work_id} Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // ForceSendFields is a list of field names (e.g. "EndpointLocation") 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 @@ -648,12 +652,13 @@ type Consumer struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndpointUri") 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. "EndpointLocation") 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/metastore/v1beta/metastore-api.json b/metastore/v1beta/metastore-api.json index a588f614c5f..c2909911ba4 100644 --- a/metastore/v1beta/metastore-api.json +++ b/metastore/v1beta/metastore-api.json @@ -1579,7 +1579,7 @@ } } }, - "revision": "20230807", + "revision": "20230905", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1794,6 +1794,11 @@ "description": "Contains information of the customer's network configurations.Next available ID: 5", "id": "Consumer", "properties": { + "endpointLocation": { + "description": "Output only. The location of the endpoint URI. Format: projects/{project}/locations/{location}.", + "readOnly": true, + "type": "string" + }, "endpointUri": { "description": "Output only. The URI of the endpoint used to access the metastore service.", "readOnly": true, diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index a00304df954..b90aceb9399 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -626,6 +626,10 @@ type CancelOperationRequest struct { // Consumer: Contains information of the customer's network // configurations.Next available ID: 5 type Consumer struct { + // EndpointLocation: Output only. The location of the endpoint URI. + // Format: projects/{project}/locations/{location}. + EndpointLocation string `json:"endpointLocation,omitempty"` + // EndpointUri: Output only. The URI of the endpoint used to access the // metastore service. EndpointUri string `json:"endpointUri,omitempty"` @@ -640,7 +644,7 @@ type Consumer struct { // work_id} Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // ForceSendFields is a list of field names (e.g. "EndpointLocation") 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 @@ -648,12 +652,13 @@ type Consumer struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndpointUri") 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. "EndpointLocation") 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/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index 15bf6941abe..35e883a2769 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20230809", + "revision": "20230906", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -908,6 +908,11 @@ "description": "Required. Unique name of the resource using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`", "type": "string" }, + "probingDetails": { + "$ref": "ProbingDetails", + "description": "Output only. The probing details of this test from the latest run, present for applicable tests only. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test.", + "readOnly": true + }, "protocol": { "description": "IP Protocol of the test. When not provided, \"TCP\" is assumed.", "type": "string" @@ -1075,6 +1080,17 @@ }, "type": "object" }, + "EdgeLocation": { + "description": "Representation of a network edge location as per https://cloud.google.com/vpc/docs/edge-locations.", + "id": "EdgeLocation", + "properties": { + "metropolitanArea": { + "description": "Name of the metropolitan area.", + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1105,6 +1121,25 @@ "description": "A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules are also used for protocol forwarding, Private Service Connect and other network services to provide forwarding information in the control plane. Format: projects/{project}/global/forwardingRules/{id} or projects/{project}/regions/{region}/forwardingRules/{id}", "type": "string" }, + "forwardingRuleTarget": { + "description": "Output only. Specifies the type of the target of the forwarding rule.", + "enum": [ + "FORWARDING_RULE_TARGET_UNSPECIFIED", + "INSTANCE", + "LOAD_BALANCER", + "VPN_GATEWAY", + "PSC" + ], + "enumDescriptions": [ + "Forwarding rule target is unknown.", + "Compute Engine instance for protocol forwarding.", + "Load Balancer. The specific type can be found from load_balancer_type.", + "Classic Cloud VPN Gateway.", + "Forwarding Rule is a Private Service Connect endpoint." + ], + "readOnly": true, + "type": "string" + }, "gkeMasterCluster": { "description": "A cluster URI for [Google Kubernetes Engine master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).", "type": "string" @@ -1114,7 +1149,43 @@ "type": "string" }, "ipAddress": { - "description": "The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a [global load balancer VIP](/load-balancing/docs/load-balancing-overview).", + "description": "The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a [global load balancer VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).", + "type": "string" + }, + "loadBalancerId": { + "description": "Output only. ID of the load balancer the forwarding rule points to. Empty for forwarding rules not related to load balancers.", + "readOnly": true, + "type": "string" + }, + "loadBalancerType": { + "description": "Output only. Type of the load balancer the forwarding rule points to.", + "enum": [ + "LOAD_BALANCER_TYPE_UNSPECIFIED", + "HTTPS_ADVANCED_LOAD_BALANCER", + "HTTPS_LOAD_BALANCER", + "REGIONAL_HTTPS_LOAD_BALANCER", + "INTERNAL_HTTPS_LOAD_BALANCER", + "SSL_PROXY_LOAD_BALANCER", + "TCP_PROXY_LOAD_BALANCER", + "INTERNAL_TCP_PROXY_LOAD_BALANCER", + "NETWORK_LOAD_BALANCER", + "LEGACY_NETWORK_LOAD_BALANCER", + "TCP_UDP_INTERNAL_LOAD_BALANCER" + ], + "enumDescriptions": [ + "Forwarding rule points to a different target than a load balancer or a load balancer type is unknown.", + "Global external HTTP(S) load balancer.", + "Global external HTTP(S) load balancer (classic)", + "Regional external HTTP(S) load balancer.", + "Internal HTTP(S) load balancer.", + "External SSL proxy load balancer.", + "External TCP proxy load balancer.", + "Internal regional TCP proxy load balancer.", + "External TCP/UDP Network load balancer.", + "Target-pool based external TCP/UDP Network load balancer.", + "Internal TCP/UDP load balancer." + ], + "readOnly": true, "type": "string" }, "network": { @@ -1448,6 +1519,37 @@ }, "type": "object" }, + "LatencyDistribution": { + "description": "Describes measured latency distribution.", + "id": "LatencyDistribution", + "properties": { + "latencyPercentiles": { + "description": "Representative latency percentiles.", + "items": { + "$ref": "LatencyPercentile" + }, + "type": "array" + } + }, + "type": "object" + }, + "LatencyPercentile": { + "description": "Latency percentile rank and value.", + "id": "LatencyPercentile", + "properties": { + "latencyMicros": { + "description": "percent-th percentile of latency observed, in microseconds. Fraction of percent/100 of samples have latency lower or equal to the value of this field.", + "format": "int64", + "type": "string" + }, + "percent": { + "description": "Percentage of samples this data point applies to.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "ListConnectivityTestsResponse": { "description": "Response for the `ListConnectivityTests` method.", "id": "ListConnectivityTestsResponse", @@ -1766,6 +1868,76 @@ }, "type": "object" }, + "ProbingDetails": { + "description": "Results of active probing from the last run of the test.", + "id": "ProbingDetails", + "properties": { + "abortCause": { + "description": "The reason probing was aborted.", + "enum": [ + "PROBING_ABORT_CAUSE_UNSPECIFIED", + "PERMISSION_DENIED", + "NO_SOURCE_LOCATION" + ], + "enumDescriptions": [ + "No reason was specified.", + "The user lacks permission to access some of the network resources required to run the test.", + "No valid source endpoint could be derived from the request." + ], + "type": "string" + }, + "destinationEgressLocation": { + "$ref": "EdgeLocation", + "description": "The EdgeLocation from which a packet destined for/originating from the internet will egress/ingress the Google network. This will only be populated for a connectivity test which has an internet destination/source address. The absence of this field *must not* be used as an indication that the destination/source is part of the Google network." + }, + "endpointInfo": { + "$ref": "EndpointInfo", + "description": "The source and destination endpoints derived from the test input and used for active probing." + }, + "error": { + "$ref": "Status", + "description": "Details about an internal failure or the cancellation of active probing." + }, + "probingLatency": { + "$ref": "LatencyDistribution", + "description": "Latency as measured by active probing in one direction: from the source to the destination endpoint." + }, + "result": { + "description": "The overall result of active probing.", + "enum": [ + "PROBING_RESULT_UNSPECIFIED", + "REACHABLE", + "UNREACHABLE", + "REACHABILITY_INCONSISTENT", + "UNDETERMINED" + ], + "enumDescriptions": [ + "No result was specified.", + "At least 95% of packets reached the destination.", + "No packets reached the destination.", + "Less than 95% of packets reached the destination.", + "Reachability could not be determined. Possible reasons are: * The user lacks permission to access some of the network resources required to run the test. * No valid source endpoint could be derived from the request. * An internal error occurred." + ], + "type": "string" + }, + "sentProbeCount": { + "description": "Number of probes sent.", + "format": "int32", + "type": "integer" + }, + "successfulProbeCount": { + "description": "Number of probes that reached the destination.", + "format": "int32", + "type": "integer" + }, + "verifyTime": { + "description": "The time that reachability was assessed through active probing.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "ReachabilityDetails": { "description": "Results of the configuration analysis from the last run of the test.", "id": "ReachabilityDetails", diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 60e87914b64..a58a3c923f1 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -764,6 +764,12 @@ type ConnectivityTest struct { // `projects/{project_id}/locations/global/connectivityTests/{test_id}` Name string `json:"name,omitempty"` + // ProbingDetails: Output only. The probing details of this test from + // the latest run, present for applicable tests only. The details are + // updated when creating a new test, updating an existing test, or + // triggering a one-time rerun of an existing test. + ProbingDetails *ProbingDetails `json:"probingDetails,omitempty"` + // Protocol: IP Protocol of the test. When not provided, "TCP" is // assumed. Protocol string `json:"protocol,omitempty"` @@ -1020,6 +1026,36 @@ func (s *DropInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// EdgeLocation: Representation of a network edge location as per +// https://cloud.google.com/vpc/docs/edge-locations. +type EdgeLocation struct { + // MetropolitanArea: Name of the metropolitan area. + MetropolitanArea string `json:"metropolitanArea,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MetropolitanArea") 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. "MetropolitanArea") 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 *EdgeLocation) MarshalJSON() ([]byte, error) { + type NoMethod EdgeLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1060,6 +1096,19 @@ type Endpoint struct { // projects/{project}/regions/{region}/forwardingRules/{id} ForwardingRule string `json:"forwardingRule,omitempty"` + // ForwardingRuleTarget: Output only. Specifies the type of the target + // of the forwarding rule. + // + // Possible values: + // "FORWARDING_RULE_TARGET_UNSPECIFIED" - Forwarding rule target is + // unknown. + // "INSTANCE" - Compute Engine instance for protocol forwarding. + // "LOAD_BALANCER" - Load Balancer. The specific type can be found + // from load_balancer_type. + // "VPN_GATEWAY" - Classic Cloud VPN Gateway. + // "PSC" - Forwarding Rule is a Private Service Connect endpoint. + ForwardingRuleTarget string `json:"forwardingRuleTarget,omitempty"` + // GkeMasterCluster: A cluster URI for Google Kubernetes Engine master // (https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). GkeMasterCluster string `json:"gkeMasterCluster,omitempty"` @@ -1070,9 +1119,38 @@ type Endpoint struct { // IpAddress: The IP address of the endpoint, which can be an external // or internal IP. An IPv6 address is only allowed when the test's // destination is a global load balancer VIP - // (/load-balancing/docs/load-balancing-overview). + // (https://cloud.google.com/load-balancing/docs/load-balancing-overview). IpAddress string `json:"ipAddress,omitempty"` + // LoadBalancerId: Output only. ID of the load balancer the forwarding + // rule points to. Empty for forwarding rules not related to load + // balancers. + LoadBalancerId string `json:"loadBalancerId,omitempty"` + + // LoadBalancerType: Output only. Type of the load balancer the + // forwarding rule points to. + // + // Possible values: + // "LOAD_BALANCER_TYPE_UNSPECIFIED" - Forwarding rule points to a + // different target than a load balancer or a load balancer type is + // unknown. + // "HTTPS_ADVANCED_LOAD_BALANCER" - Global external HTTP(S) load + // balancer. + // "HTTPS_LOAD_BALANCER" - Global external HTTP(S) load balancer + // (classic) + // "REGIONAL_HTTPS_LOAD_BALANCER" - Regional external HTTP(S) load + // balancer. + // "INTERNAL_HTTPS_LOAD_BALANCER" - Internal HTTP(S) load balancer. + // "SSL_PROXY_LOAD_BALANCER" - External SSL proxy load balancer. + // "TCP_PROXY_LOAD_BALANCER" - External TCP proxy load balancer. + // "INTERNAL_TCP_PROXY_LOAD_BALANCER" - Internal regional TCP proxy + // load balancer. + // "NETWORK_LOAD_BALANCER" - External TCP/UDP Network load balancer. + // "LEGACY_NETWORK_LOAD_BALANCER" - Target-pool based external TCP/UDP + // Network load balancer. + // "TCP_UDP_INTERNAL_LOAD_BALANCER" - Internal TCP/UDP load balancer. + LoadBalancerType string `json:"loadBalancerType,omitempty"` + // Network: A Compute Engine network URI. Network string `json:"network,omitempty"` @@ -1569,6 +1647,68 @@ func (s *InstanceInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LatencyDistribution: Describes measured latency distribution. +type LatencyDistribution struct { + // LatencyPercentiles: Representative latency percentiles. + LatencyPercentiles []*LatencyPercentile `json:"latencyPercentiles,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LatencyPercentiles") + // 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. "LatencyPercentiles") 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 *LatencyDistribution) MarshalJSON() ([]byte, error) { + type NoMethod LatencyDistribution + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LatencyPercentile: Latency percentile rank and value. +type LatencyPercentile struct { + // LatencyMicros: percent-th percentile of latency observed, in + // microseconds. Fraction of percent/100 of samples have latency lower + // or equal to the value of this field. + LatencyMicros int64 `json:"latencyMicros,omitempty,string"` + + // Percent: Percentage of samples this data point applies to. + Percent int64 `json:"percent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LatencyMicros") 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. "LatencyMicros") 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 *LatencyPercentile) MarshalJSON() ([]byte, error) { + type NoMethod LatencyPercentile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListConnectivityTestsResponse: Response for the // `ListConnectivityTests` method. type ListConnectivityTestsResponse struct { @@ -2099,6 +2239,87 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ProbingDetails: Results of active probing from the last run of the +// test. +type ProbingDetails struct { + // AbortCause: The reason probing was aborted. + // + // Possible values: + // "PROBING_ABORT_CAUSE_UNSPECIFIED" - No reason was specified. + // "PERMISSION_DENIED" - The user lacks permission to access some of + // the network resources required to run the test. + // "NO_SOURCE_LOCATION" - No valid source endpoint could be derived + // from the request. + AbortCause string `json:"abortCause,omitempty"` + + // DestinationEgressLocation: The EdgeLocation from which a packet + // destined for/originating from the internet will egress/ingress the + // Google network. This will only be populated for a connectivity test + // which has an internet destination/source address. The absence of this + // field *must not* be used as an indication that the destination/source + // is part of the Google network. + DestinationEgressLocation *EdgeLocation `json:"destinationEgressLocation,omitempty"` + + // EndpointInfo: The source and destination endpoints derived from the + // test input and used for active probing. + EndpointInfo *EndpointInfo `json:"endpointInfo,omitempty"` + + // Error: Details about an internal failure or the cancellation of + // active probing. + Error *Status `json:"error,omitempty"` + + // ProbingLatency: Latency as measured by active probing in one + // direction: from the source to the destination endpoint. + ProbingLatency *LatencyDistribution `json:"probingLatency,omitempty"` + + // Result: The overall result of active probing. + // + // Possible values: + // "PROBING_RESULT_UNSPECIFIED" - No result was specified. + // "REACHABLE" - At least 95% of packets reached the destination. + // "UNREACHABLE" - No packets reached the destination. + // "REACHABILITY_INCONSISTENT" - Less than 95% of packets reached the + // destination. + // "UNDETERMINED" - Reachability could not be determined. Possible + // reasons are: * The user lacks permission to access some of the + // network resources required to run the test. * No valid source + // endpoint could be derived from the request. * An internal error + // occurred. + Result string `json:"result,omitempty"` + + // SentProbeCount: Number of probes sent. + SentProbeCount int64 `json:"sentProbeCount,omitempty"` + + // SuccessfulProbeCount: Number of probes that reached the destination. + SuccessfulProbeCount int64 `json:"successfulProbeCount,omitempty"` + + // VerifyTime: The time that reachability was assessed through active + // probing. + VerifyTime string `json:"verifyTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AbortCause") 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. "AbortCause") 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 *ProbingDetails) MarshalJSON() ([]byte, error) { + type NoMethod ProbingDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ReachabilityDetails: Results of the configuration analysis from the // last run of the test. type ReachabilityDetails struct { diff --git a/rapidmigrationassessment/v1/rapidmigrationassessment-api.json b/rapidmigrationassessment/v1/rapidmigrationassessment-api.json new file mode 100644 index 00000000000..ec24a1154b5 --- /dev/null +++ b/rapidmigrationassessment/v1/rapidmigrationassessment-api.json @@ -0,0 +1,1059 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://rapidmigrationassessment.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Rapid Migration Assessment", + "description": "The Rapid Migration Assessment service is our first-party migration assessment and planning tool.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/migration-center", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "rapidmigrationassessment:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://rapidmigrationassessment.mtls.googleapis.com/", + "name": "rapidmigrationassessment", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "rapidmigrationassessment.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "rapidmigrationassessment.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "annotations": { + "methods": { + "create": { + "description": "Creates an Annotation", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/annotations", + "httpMethod": "POST", + "id": "rapidmigrationassessment.projects.locations.annotations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Name of the parent (project+location).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/annotations", + "request": { + "$ref": "Annotation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Annotation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/annotations/{annotationsId}", + "httpMethod": "GET", + "id": "rapidmigrationassessment.projects.locations.annotations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/annotations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Annotation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "collectors": { + "methods": { + "create": { + "description": "Create a Collector to manage the on-prem appliance which collects information about Customer assets.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors", + "httpMethod": "POST", + "id": "rapidmigrationassessment.projects.locations.collectors.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "collectorId": { + "description": "Required. Id of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent (project+location).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/collectors", + "request": { + "$ref": "Collector" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Collector - changes state of collector to \"Deleting\". Background jobs does final deletion thorugh producer api.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}", + "httpMethod": "DELETE", + "id": "rapidmigrationassessment.projects.locations.collectors.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + "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 will know to ignore the request if it has already been completed. The server will guarantee 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, will ignore 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 a single Collector.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}", + "httpMethod": "GET", + "id": "rapidmigrationassessment.projects.locations.collectors.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Collector" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Collectors in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors", + "httpMethod": "GET", + "id": "rapidmigrationassessment.projects.locations.collectors.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListCollectorsRequest.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/collectors", + "response": { + "$ref": "ListCollectorsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Collector.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}", + "httpMethod": "PATCH", + "id": "rapidmigrationassessment.projects.locations.collectors.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "name of resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + "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 will know to ignore the request if it has already been completed. The server will guarantee 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, will ignore 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. Field mask is used to specify the fields to be overwritten in the Collector 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": "Collector" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "pause": { + "description": "Pauses the given collector.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}:pause", + "httpMethod": "POST", + "id": "rapidmigrationassessment.projects.locations.collectors.pause", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:pause", + "request": { + "$ref": "PauseCollectorRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "register": { + "description": "Registers the given collector.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}:register", + "httpMethod": "POST", + "id": "rapidmigrationassessment.projects.locations.collectors.register", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:register", + "request": { + "$ref": "RegisterCollectorRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resume": { + "description": "Resumes the given collector.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}:resume", + "httpMethod": "POST", + "id": "rapidmigrationassessment.projects.locations.collectors.resume", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:resume", + "request": { + "$ref": "ResumeCollectorRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "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": "rapidmigrationassessment.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" + ] + }, + "delete": { + "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": "rapidmigrationassessment.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" + ] + }, + "get": { + "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": "rapidmigrationassessment.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" + ] + }, + "list": { + "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": "rapidmigrationassessment.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" + ] + } + } + } + } + } + } + } + }, + "revision": "20230824", + "rootUrl": "https://rapidmigrationassessment.googleapis.com/", + "schemas": { + "Annotation": { + "description": "Message describing an Annotation", + "id": "Annotation", + "properties": { + "createTime": { + "description": "Output only. Create time stamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs.", + "type": "object" + }, + "name": { + "description": "name of resource.", + "type": "string" + }, + "type": { + "description": "Type of an annotation.", + "enum": [ + "TYPE_UNSPECIFIED", + "TYPE_LEGACY_EXPORT_CONSENT", + "TYPE_QWIKLAB" + ], + "enumDescriptions": [ + "Unknown type", + "Indicates that this project has opted into StratoZone export.", + "Indicates that this project is created by Qwiklab." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "Collector": { + "description": "Message describing Collector object.", + "id": "Collector", + "properties": { + "bucket": { + "description": "Output only. Store cloud storage bucket name (which is a guid) created with this Collector.", + "readOnly": true, + "type": "string" + }, + "clientVersion": { + "description": "Output only. Client version.", + "readOnly": true, + "type": "string" + }, + "collectionDays": { + "description": "How many days to collect data.", + "format": "int32", + "type": "integer" + }, + "createTime": { + "description": "Output only. Create time stamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "User specified description of the Collector.", + "type": "string" + }, + "displayName": { + "description": "User specified name of the Collector.", + "type": "string" + }, + "eulaUri": { + "description": "Uri for EULA (End User License Agreement) from customer.", + "type": "string" + }, + "expectedAssetCount": { + "description": "User specified expected asset count.", + "format": "int64", + "type": "string" + }, + "guestOsScan": { + "$ref": "GuestOsScan", + "description": "Output only. Reference to MC Source Guest Os Scan.", + "readOnly": true + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs.", + "type": "object" + }, + "name": { + "description": "name of resource.", + "type": "string" + }, + "serviceAccount": { + "description": "Service Account email used to ingest data to this Collector.", + "type": "string" + }, + "state": { + "description": "Output only. State of the Collector.", + "enum": [ + "STATE_UNSPECIFIED", + "STATE_INITIALIZING", + "STATE_READY_TO_USE", + "STATE_REGISTERED", + "STATE_ACTIVE", + "STATE_PAUSED", + "STATE_DELETING", + "STATE_DECOMMISSIONED", + "STATE_ERROR" + ], + "enumDescriptions": [ + "Collector state is not recognized.", + "Collector started to create, but hasn't been completed MC source creation and db object creation.", + "Collector has been created, MC source creation and db object creation completed.", + "Collector client has been registered with client.", + "Collector client is actively scanning.", + "Collector is not actively scanning.", + "Collector is starting background job for deletion.", + "Collector completed all tasks for deletion.", + "Collector is in error state." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vsphereScan": { + "$ref": "VSphereScan", + "description": "Output only. Reference to MC Source vsphere_scan.", + "readOnly": true + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "GuestOsScan": { + "description": "Message describing a MC Source of type Guest OS Scan.", + "id": "GuestOsScan", + "properties": { + "coreSource": { + "description": "reference to the corresponding Guest OS Scan in MC Source.", + "type": "string" + } + }, + "type": "object" + }, + "ListCollectorsResponse": { + "description": "Message for response to listing Collectors.", + "id": "ListCollectorsResponse", + "properties": { + "collectors": { + "description": "The list of Collectors.", + "items": { + "$ref": "Collector" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "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", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PauseCollectorRequest": { + "description": "Message for pausing a Collector.", + "id": "PauseCollectorRequest", + "properties": { + "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 will know to ignore the request if it has already been completed. The server will guarantee 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, will ignore 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).", + "type": "string" + } + }, + "type": "object" + }, + "RegisterCollectorRequest": { + "description": "Message for registering a Collector.", + "id": "RegisterCollectorRequest", + "properties": { + "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 will know to ignore the request if it has already been completed. The server will guarantee 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, will ignore 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).", + "type": "string" + } + }, + "type": "object" + }, + "ResumeCollectorRequest": { + "description": "Message for resuming a Collector.", + "id": "ResumeCollectorRequest", + "properties": { + "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 will know to ignore the request if it has already been completed. The server will guarantee 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, will ignore 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).", + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "VSphereScan": { + "description": "Message describing a MC Source of type VSphere Scan.", + "id": "VSphereScan", + "properties": { + "coreSource": { + "description": "reference to the corresponding VSphere Scan in MC Source.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Rapid Migration Assessment API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/rapidmigrationassessment/v1/rapidmigrationassessment-gen.go b/rapidmigrationassessment/v1/rapidmigrationassessment-gen.go new file mode 100644 index 00000000000..596d1d5a786 --- /dev/null +++ b/rapidmigrationassessment/v1/rapidmigrationassessment-gen.go @@ -0,0 +1,3450 @@ +// Copyright 2023 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package rapidmigrationassessment provides access to the Rapid Migration Assessment API. +// +// For product documentation, see: https://cloud.google.com/migration-center +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/rapidmigrationassessment/v1" +// ... +// ctx := context.Background() +// rapidmigrationassessmentService, err := rapidmigrationassessment.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// rapidmigrationassessmentService, err := rapidmigrationassessment.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// rapidmigrationassessmentService, err := rapidmigrationassessment.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package rapidmigrationassessment // import "google.golang.org/api/rapidmigrationassessment/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "rapidmigrationassessment:v1" +const apiName = "rapidmigrationassessment" +const apiVersion = "v1" +const basePath = "https://rapidmigrationassessment.googleapis.com/" +const mtlsBasePath = "https://rapidmigrationassessment.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Annotations = NewProjectsLocationsAnnotationsService(s) + rs.Collectors = NewProjectsLocationsCollectorsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Annotations *ProjectsLocationsAnnotationsService + + Collectors *ProjectsLocationsCollectorsService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsAnnotationsService(s *Service) *ProjectsLocationsAnnotationsService { + rs := &ProjectsLocationsAnnotationsService{s: s} + return rs +} + +type ProjectsLocationsAnnotationsService struct { + s *Service +} + +func NewProjectsLocationsCollectorsService(s *Service) *ProjectsLocationsCollectorsService { + rs := &ProjectsLocationsCollectorsService{s: s} + return rs +} + +type ProjectsLocationsCollectorsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// Annotation: Message describing an Annotation +type Annotation struct { + // CreateTime: Output only. Create time stamp. + CreateTime string `json:"createTime,omitempty"` + + // Labels: Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // Name: name of resource. + Name string `json:"name,omitempty"` + + // Type: Type of an annotation. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unknown type + // "TYPE_LEGACY_EXPORT_CONSENT" - Indicates that this project has + // opted into StratoZone export. + // "TYPE_QWIKLAB" - Indicates that this project is created by Qwiklab. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Update time stamp. + 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 *Annotation) MarshalJSON() ([]byte, error) { + type NoMethod Annotation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// Collector: Message describing Collector object. +type Collector struct { + // Bucket: Output only. Store cloud storage bucket name (which is a + // guid) created with this Collector. + Bucket string `json:"bucket,omitempty"` + + // ClientVersion: Output only. Client version. + ClientVersion string `json:"clientVersion,omitempty"` + + // CollectionDays: How many days to collect data. + CollectionDays int64 `json:"collectionDays,omitempty"` + + // CreateTime: Output only. Create time stamp. + CreateTime string `json:"createTime,omitempty"` + + // Description: User specified description of the Collector. + Description string `json:"description,omitempty"` + + // DisplayName: User specified name of the Collector. + DisplayName string `json:"displayName,omitempty"` + + // EulaUri: Uri for EULA (End User License Agreement) from customer. + EulaUri string `json:"eulaUri,omitempty"` + + // ExpectedAssetCount: User specified expected asset count. + ExpectedAssetCount int64 `json:"expectedAssetCount,omitempty,string"` + + // GuestOsScan: Output only. Reference to MC Source Guest Os Scan. + GuestOsScan *GuestOsScan `json:"guestOsScan,omitempty"` + + // Labels: Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // Name: name of resource. + Name string `json:"name,omitempty"` + + // ServiceAccount: Service Account email used to ingest data to this + // Collector. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // State: Output only. State of the Collector. + // + // Possible values: + // "STATE_UNSPECIFIED" - Collector state is not recognized. + // "STATE_INITIALIZING" - Collector started to create, but hasn't been + // completed MC source creation and db object creation. + // "STATE_READY_TO_USE" - Collector has been created, MC source + // creation and db object creation completed. + // "STATE_REGISTERED" - Collector client has been registered with + // client. + // "STATE_ACTIVE" - Collector client is actively scanning. + // "STATE_PAUSED" - Collector is not actively scanning. + // "STATE_DELETING" - Collector is starting background job for + // deletion. + // "STATE_DECOMMISSIONED" - Collector completed all tasks for + // deletion. + // "STATE_ERROR" - Collector is in error state. + State string `json:"state,omitempty"` + + // UpdateTime: Output only. Update time stamp. + UpdateTime string `json:"updateTime,omitempty"` + + // VsphereScan: Output only. Reference to MC Source vsphere_scan. + VsphereScan *VSphereScan `json:"vsphereScan,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Bucket") 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. "Bucket") 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 *Collector) MarshalJSON() ([]byte, error) { + type NoMethod Collector + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GuestOsScan: Message describing a MC Source of type Guest OS Scan. +type GuestOsScan struct { + // CoreSource: reference to the corresponding Guest OS Scan in MC + // Source. + CoreSource string `json:"coreSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CoreSource") 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. "CoreSource") 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 *GuestOsScan) MarshalJSON() ([]byte, error) { + type NoMethod GuestOsScan + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListCollectorsResponse: Message for response to listing Collectors. +type ListCollectorsResponse struct { + // Collectors: The list of Collectors. + Collectors []*Collector `json:"collectors,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + 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. "Collectors") 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. "Collectors") 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 *ListCollectorsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListCollectorsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + 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"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") 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. "ApiVersion") 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 *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PauseCollectorRequest: Message for pausing a Collector. +type PauseCollectorRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee 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, + // will ignore 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). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") 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. "RequestId") 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 *PauseCollectorRequest) MarshalJSON() ([]byte, error) { + type NoMethod PauseCollectorRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RegisterCollectorRequest: Message for registering a Collector. +type RegisterCollectorRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee 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, + // will ignore 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). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") 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. "RequestId") 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 *RegisterCollectorRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegisterCollectorRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResumeCollectorRequest: Message for resuming a Collector. +type ResumeCollectorRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee 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, + // will ignore 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). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") 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. "RequestId") 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 *ResumeCollectorRequest) MarshalJSON() ([]byte, error) { + type NoMethod ResumeCollectorRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VSphereScan: Message describing a MC Source of type VSphere Scan. +type VSphereScan struct { + // CoreSource: reference to the corresponding VSphere Scan in MC Source. + CoreSource string `json:"coreSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CoreSource") 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. "CoreSource") 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 *VSphereScan) MarshalJSON() ([]byte, error) { + type NoMethod VSphereScan + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "rapidmigrationassessment.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) 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 "rapidmigrationassessment.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{ + 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 information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "rapidmigrationassessment.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "rapidmigrationassessment.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) 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}/locations") + 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 "rapidmigrationassessment.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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 := &ListLocationsResponse{ + 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 information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "rapidmigrationassessment.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) 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 "rapidmigrationassessment.projects.locations.annotations.create": + +type ProjectsLocationsAnnotationsCreateCall struct { + s *Service + parent string + annotation *Annotation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an Annotation +// +// - parent: Name of the parent (project+location). +func (r *ProjectsLocationsAnnotationsService) Create(parent string, annotation *Annotation) *ProjectsLocationsAnnotationsCreateCall { + c := &ProjectsLocationsAnnotationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.annotation = annotation + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. +func (c *ProjectsLocationsAnnotationsCreateCall) RequestId(requestId string) *ProjectsLocationsAnnotationsCreateCall { + 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 *ProjectsLocationsAnnotationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAnnotationsCreateCall { + 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 *ProjectsLocationsAnnotationsCreateCall) Context(ctx context.Context) *ProjectsLocationsAnnotationsCreateCall { + 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 *ProjectsLocationsAnnotationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAnnotationsCreateCall) 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.annotation) + 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}/annotations") + 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 "rapidmigrationassessment.projects.locations.annotations.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 *ProjectsLocationsAnnotationsCreateCall) 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 an Annotation", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/annotations", + // "httpMethod": "POST", + // "id": "rapidmigrationassessment.projects.locations.annotations.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Name of the parent (project+location).", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/annotations", + // "request": { + // "$ref": "Annotation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "rapidmigrationassessment.projects.locations.annotations.get": + +type ProjectsLocationsAnnotationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Annotation. +// +// - name: Name of the resource. +func (r *ProjectsLocationsAnnotationsService) Get(name string) *ProjectsLocationsAnnotationsGetCall { + c := &ProjectsLocationsAnnotationsGetCall{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 *ProjectsLocationsAnnotationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAnnotationsGetCall { + 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 *ProjectsLocationsAnnotationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAnnotationsGetCall { + 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 *ProjectsLocationsAnnotationsGetCall) Context(ctx context.Context) *ProjectsLocationsAnnotationsGetCall { + 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 *ProjectsLocationsAnnotationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAnnotationsGetCall) 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 "rapidmigrationassessment.projects.locations.annotations.get" call. +// Exactly one of *Annotation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Annotation.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 *ProjectsLocationsAnnotationsGetCall) Do(opts ...googleapi.CallOption) (*Annotation, 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 := &Annotation{ + 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 Annotation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/annotations/{annotationsId}", + // "httpMethod": "GET", + // "id": "rapidmigrationassessment.projects.locations.annotations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/annotations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Annotation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "rapidmigrationassessment.projects.locations.collectors.create": + +type ProjectsLocationsCollectorsCreateCall struct { + s *Service + parent string + collector *Collector + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a Collector to manage the on-prem appliance which +// collects information about Customer assets. +// +// - parent: Name of the parent (project+location). +func (r *ProjectsLocationsCollectorsService) Create(parent string, collector *Collector) *ProjectsLocationsCollectorsCreateCall { + c := &ProjectsLocationsCollectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.collector = collector + return c +} + +// CollectorId sets the optional parameter "collectorId": Required. Id +// of the requesting object. +func (c *ProjectsLocationsCollectorsCreateCall) CollectorId(collectorId string) *ProjectsLocationsCollectorsCreateCall { + c.urlParams_.Set("collectorId", collectorId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. +func (c *ProjectsLocationsCollectorsCreateCall) RequestId(requestId string) *ProjectsLocationsCollectorsCreateCall { + 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 *ProjectsLocationsCollectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectorsCreateCall { + 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 *ProjectsLocationsCollectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectorsCreateCall { + 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 *ProjectsLocationsCollectorsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectorsCreateCall) 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.collector) + 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}/collectors") + 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 "rapidmigrationassessment.projects.locations.collectors.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 *ProjectsLocationsCollectorsCreateCall) 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": "Create a Collector to manage the on-prem appliance which collects information about Customer assets.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors", + // "httpMethod": "POST", + // "id": "rapidmigrationassessment.projects.locations.collectors.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "collectorId": { + // "description": "Required. Id of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the parent (project+location).", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/collectors", + // "request": { + // "$ref": "Collector" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "rapidmigrationassessment.projects.locations.collectors.delete": + +type ProjectsLocationsCollectorsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Collector - changes state of collector to +// "Deleting". Background jobs does final deletion thorugh producer api. +// +// - name: Name of the resource. +func (r *ProjectsLocationsCollectorsService) Delete(name string) *ProjectsLocationsCollectorsDeleteCall { + c := &ProjectsLocationsCollectorsDeleteCall{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 will know to ignore the +// request if it has already been completed. The server will guarantee +// 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, will ignore 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 *ProjectsLocationsCollectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsCollectorsDeleteCall { + 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 *ProjectsLocationsCollectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectorsDeleteCall { + 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 *ProjectsLocationsCollectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectorsDeleteCall { + 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 *ProjectsLocationsCollectorsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectorsDeleteCall) 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 "rapidmigrationassessment.projects.locations.collectors.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 *ProjectsLocationsCollectorsDeleteCall) 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 Collector - changes state of collector to \"Deleting\". Background jobs does final deletion thorugh producer api.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}", + // "httpMethod": "DELETE", + // "id": "rapidmigrationassessment.projects.locations.collectors.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + // "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 will know to ignore the request if it has already been completed. The server will guarantee 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, will ignore 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" + // ] + // } + +} + +// method id "rapidmigrationassessment.projects.locations.collectors.get": + +type ProjectsLocationsCollectorsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Collector. +// +// - name: Name of the resource. +func (r *ProjectsLocationsCollectorsService) Get(name string) *ProjectsLocationsCollectorsGetCall { + c := &ProjectsLocationsCollectorsGetCall{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 *ProjectsLocationsCollectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectorsGetCall { + 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 *ProjectsLocationsCollectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectorsGetCall { + 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 *ProjectsLocationsCollectorsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectorsGetCall { + 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 *ProjectsLocationsCollectorsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectorsGetCall) 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 "rapidmigrationassessment.projects.locations.collectors.get" call. +// Exactly one of *Collector or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Collector.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 *ProjectsLocationsCollectorsGetCall) Do(opts ...googleapi.CallOption) (*Collector, 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 := &Collector{ + 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 Collector.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}", + // "httpMethod": "GET", + // "id": "rapidmigrationassessment.projects.locations.collectors.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Collector" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "rapidmigrationassessment.projects.locations.collectors.list": + +type ProjectsLocationsCollectorsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Collectors in a given project and location. +// +// - parent: Parent value for ListCollectorsRequest. +func (r *ProjectsLocationsCollectorsService) List(parent string) *ProjectsLocationsCollectorsListCall { + c := &ProjectsLocationsCollectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsCollectorsListCall) Filter(filter string) *ProjectsLocationsCollectorsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results. +func (c *ProjectsLocationsCollectorsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectorsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsCollectorsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectorsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsCollectorsListCall) PageToken(pageToken string) *ProjectsLocationsCollectorsListCall { + 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 *ProjectsLocationsCollectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectorsListCall { + 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 *ProjectsLocationsCollectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectorsListCall { + 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 *ProjectsLocationsCollectorsListCall) Context(ctx context.Context) *ProjectsLocationsCollectorsListCall { + 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 *ProjectsLocationsCollectorsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectorsListCall) 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}/collectors") + 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 "rapidmigrationassessment.projects.locations.collectors.list" call. +// Exactly one of *ListCollectorsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListCollectorsResponse.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 *ProjectsLocationsCollectorsListCall) Do(opts ...googleapi.CallOption) (*ListCollectorsResponse, 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 := &ListCollectorsResponse{ + 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 Collectors in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors", + // "httpMethod": "GET", + // "id": "rapidmigrationassessment.projects.locations.collectors.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Hint for how to order the results.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListCollectorsRequest.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/collectors", + // "response": { + // "$ref": "ListCollectorsResponse" + // }, + // "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 *ProjectsLocationsCollectorsListCall) Pages(ctx context.Context, f func(*ListCollectorsResponse) 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 "rapidmigrationassessment.projects.locations.collectors.patch": + +type ProjectsLocationsCollectorsPatchCall struct { + s *Service + name string + collector *Collector + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Collector. +// +// - name: name of resource. +func (r *ProjectsLocationsCollectorsService) Patch(name string, collector *Collector) *ProjectsLocationsCollectorsPatchCall { + c := &ProjectsLocationsCollectorsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.collector = collector + 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 will know to ignore the +// request if it has already been completed. The server will guarantee +// 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, will ignore 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 *ProjectsLocationsCollectorsPatchCall) RequestId(requestId string) *ProjectsLocationsCollectorsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the Collector +// 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 *ProjectsLocationsCollectorsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectorsPatchCall { + 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 *ProjectsLocationsCollectorsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectorsPatchCall { + 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 *ProjectsLocationsCollectorsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectorsPatchCall { + 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 *ProjectsLocationsCollectorsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectorsPatchCall) 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.collector) + 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 "rapidmigrationassessment.projects.locations.collectors.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 *ProjectsLocationsCollectorsPatchCall) 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 Collector.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}", + // "httpMethod": "PATCH", + // "id": "rapidmigrationassessment.projects.locations.collectors.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "name of resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + // "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 will know to ignore the request if it has already been completed. The server will guarantee 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, will ignore 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. Field mask is used to specify the fields to be overwritten in the Collector 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": "Collector" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "rapidmigrationassessment.projects.locations.collectors.pause": + +type ProjectsLocationsCollectorsPauseCall struct { + s *Service + name string + pausecollectorrequest *PauseCollectorRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Pause: Pauses the given collector. +// +// - name: Name of the resource. +func (r *ProjectsLocationsCollectorsService) Pause(name string, pausecollectorrequest *PauseCollectorRequest) *ProjectsLocationsCollectorsPauseCall { + c := &ProjectsLocationsCollectorsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.pausecollectorrequest = pausecollectorrequest + 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 *ProjectsLocationsCollectorsPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectorsPauseCall { + 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 *ProjectsLocationsCollectorsPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectorsPauseCall { + 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 *ProjectsLocationsCollectorsPauseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectorsPauseCall) 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.pausecollectorrequest) + 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}:pause") + 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 "rapidmigrationassessment.projects.locations.collectors.pause" 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 *ProjectsLocationsCollectorsPauseCall) 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": "Pauses the given collector.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}:pause", + // "httpMethod": "POST", + // "id": "rapidmigrationassessment.projects.locations.collectors.pause", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:pause", + // "request": { + // "$ref": "PauseCollectorRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "rapidmigrationassessment.projects.locations.collectors.register": + +type ProjectsLocationsCollectorsRegisterCall struct { + s *Service + name string + registercollectorrequest *RegisterCollectorRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Register: Registers the given collector. +// +// - name: Name of the resource. +func (r *ProjectsLocationsCollectorsService) Register(name string, registercollectorrequest *RegisterCollectorRequest) *ProjectsLocationsCollectorsRegisterCall { + c := &ProjectsLocationsCollectorsRegisterCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.registercollectorrequest = registercollectorrequest + 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 *ProjectsLocationsCollectorsRegisterCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectorsRegisterCall { + 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 *ProjectsLocationsCollectorsRegisterCall) Context(ctx context.Context) *ProjectsLocationsCollectorsRegisterCall { + 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 *ProjectsLocationsCollectorsRegisterCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectorsRegisterCall) 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.registercollectorrequest) + 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}:register") + 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 "rapidmigrationassessment.projects.locations.collectors.register" 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 *ProjectsLocationsCollectorsRegisterCall) 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": "Registers the given collector.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}:register", + // "httpMethod": "POST", + // "id": "rapidmigrationassessment.projects.locations.collectors.register", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:register", + // "request": { + // "$ref": "RegisterCollectorRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "rapidmigrationassessment.projects.locations.collectors.resume": + +type ProjectsLocationsCollectorsResumeCall struct { + s *Service + name string + resumecollectorrequest *ResumeCollectorRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resume: Resumes the given collector. +// +// - name: Name of the resource. +func (r *ProjectsLocationsCollectorsService) Resume(name string, resumecollectorrequest *ResumeCollectorRequest) *ProjectsLocationsCollectorsResumeCall { + c := &ProjectsLocationsCollectorsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.resumecollectorrequest = resumecollectorrequest + 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 *ProjectsLocationsCollectorsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectorsResumeCall { + 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 *ProjectsLocationsCollectorsResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectorsResumeCall { + 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 *ProjectsLocationsCollectorsResumeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectorsResumeCall) 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.resumecollectorrequest) + 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}:resume") + 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 "rapidmigrationassessment.projects.locations.collectors.resume" 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 *ProjectsLocationsCollectorsResumeCall) 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": "Resumes the given collector.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}:resume", + // "httpMethod": "POST", + // "id": "rapidmigrationassessment.projects.locations.collectors.resume", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:resume", + // "request": { + // "$ref": "ResumeCollectorRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "rapidmigrationassessment.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 "rapidmigrationassessment.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": "rapidmigrationassessment.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 "rapidmigrationassessment.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 "rapidmigrationassessment.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": "rapidmigrationassessment.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 "rapidmigrationassessment.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 "rapidmigrationassessment.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": "rapidmigrationassessment.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 "rapidmigrationassessment.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 "rapidmigrationassessment.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": "rapidmigrationassessment.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) + } +} diff --git a/smartdevicemanagement/v1/smartdevicemanagement-api.json b/smartdevicemanagement/v1/smartdevicemanagement-api.json index e7ae8cf483b..78b73783603 100644 --- a/smartdevicemanagement/v1/smartdevicemanagement-api.json +++ b/smartdevicemanagement/v1/smartdevicemanagement-api.json @@ -2,11 +2,11 @@ "auth": { "oauth2": { "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + }, "https://www.googleapis.com/auth/sdm.service": { "description": "See and/or control the devices that you selected" - }, - "https://www.googleapis.com/auth/userinfo.email": { - "description": "See your primary Google Account email address" } } } @@ -137,8 +137,8 @@ "$ref": "GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse" }, "scopes": [ - "https://www.googleapis.com/auth/sdm.service", - "https://www.googleapis.com/auth/userinfo.email" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sdm.service" ] }, "get": { @@ -163,8 +163,8 @@ "$ref": "GoogleHomeEnterpriseSdmV1Device" }, "scopes": [ - "https://www.googleapis.com/auth/sdm.service", - "https://www.googleapis.com/auth/userinfo.email" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sdm.service" ] }, "list": { @@ -194,8 +194,8 @@ "$ref": "GoogleHomeEnterpriseSdmV1ListDevicesResponse" }, "scopes": [ - "https://www.googleapis.com/auth/sdm.service", - "https://www.googleapis.com/auth/userinfo.email" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sdm.service" ] } } @@ -224,8 +224,8 @@ "$ref": "GoogleHomeEnterpriseSdmV1Structure" }, "scopes": [ - "https://www.googleapis.com/auth/sdm.service", - "https://www.googleapis.com/auth/userinfo.email" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sdm.service" ] }, "list": { @@ -255,8 +255,8 @@ "$ref": "GoogleHomeEnterpriseSdmV1ListStructuresResponse" }, "scopes": [ - "https://www.googleapis.com/auth/sdm.service", - "https://www.googleapis.com/auth/userinfo.email" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sdm.service" ] } }, @@ -285,8 +285,8 @@ "$ref": "GoogleHomeEnterpriseSdmV1Room" }, "scopes": [ - "https://www.googleapis.com/auth/sdm.service", - "https://www.googleapis.com/auth/userinfo.email" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sdm.service" ] }, "list": { @@ -311,8 +311,8 @@ "$ref": "GoogleHomeEnterpriseSdmV1ListRoomsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/sdm.service", - "https://www.googleapis.com/auth/userinfo.email" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sdm.service" ] } } @@ -322,7 +322,7 @@ } } }, - "revision": "20230726", + "revision": "20230907", "rootUrl": "https://smartdevicemanagement.googleapis.com/", "schemas": { "GoogleHomeEnterpriseSdmV1Device": { diff --git a/smartdevicemanagement/v1/smartdevicemanagement-gen.go b/smartdevicemanagement/v1/smartdevicemanagement-gen.go index 015bc75ec81..066333e34e3 100644 --- a/smartdevicemanagement/v1/smartdevicemanagement-gen.go +++ b/smartdevicemanagement/v1/smartdevicemanagement-gen.go @@ -37,7 +37,7 @@ // By default, all available scopes (see "Constants") are used to authenticate. // To restrict scopes, use [google.golang.org/api/option.WithScopes]: // -// smartdevicemanagementService, err := smartdevicemanagement.NewService(ctx, option.WithScopes(smartdevicemanagement.UserinfoEmailScope)) +// smartdevicemanagementService, err := smartdevicemanagement.NewService(ctx, option.WithScopes(smartdevicemanagement.SdmServiceScope)) // // To use an API key for authentication (note: some APIs do not support API // keys), use [google.golang.org/api/option.WithAPIKey]: @@ -99,18 +99,19 @@ const mtlsBasePath = "https://smartdevicemanagement.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" + // See and/or control the devices that you selected SdmServiceScope = "https://www.googleapis.com/auth/sdm.service" - - // See your primary Google Account email address - UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email" ) // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/sdm.service", - "https://www.googleapis.com/auth/userinfo.email", ) // NOTE: prepend, so we don't override user-specified scopes. opts = append([]option.ClientOption{scopesOption}, opts...) @@ -667,8 +668,8 @@ func (c *EnterprisesDevicesExecuteCommandCall) Do(opts ...googleapi.CallOption) // "$ref": "GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/sdm.service", - // "https://www.googleapis.com/auth/userinfo.email" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/sdm.service" // ] // } @@ -815,8 +816,8 @@ func (c *EnterprisesDevicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleHom // "$ref": "GoogleHomeEnterpriseSdmV1Device" // }, // "scopes": [ - // "https://www.googleapis.com/auth/sdm.service", - // "https://www.googleapis.com/auth/userinfo.email" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/sdm.service" // ] // } @@ -978,8 +979,8 @@ func (c *EnterprisesDevicesListCall) Do(opts ...googleapi.CallOption) (*GoogleHo // "$ref": "GoogleHomeEnterpriseSdmV1ListDevicesResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/sdm.service", - // "https://www.googleapis.com/auth/userinfo.email" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/sdm.service" // ] // } @@ -1127,8 +1128,8 @@ func (c *EnterprisesStructuresGetCall) Do(opts ...googleapi.CallOption) (*Google // "$ref": "GoogleHomeEnterpriseSdmV1Structure" // }, // "scopes": [ - // "https://www.googleapis.com/auth/sdm.service", - // "https://www.googleapis.com/auth/userinfo.email" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/sdm.service" // ] // } @@ -1291,8 +1292,8 @@ func (c *EnterprisesStructuresListCall) Do(opts ...googleapi.CallOption) (*Googl // "$ref": "GoogleHomeEnterpriseSdmV1ListStructuresResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/sdm.service", - // "https://www.googleapis.com/auth/userinfo.email" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/sdm.service" // ] // } @@ -1439,8 +1440,8 @@ func (c *EnterprisesStructuresRoomsGetCall) Do(opts ...googleapi.CallOption) (*G // "$ref": "GoogleHomeEnterpriseSdmV1Room" // }, // "scopes": [ - // "https://www.googleapis.com/auth/sdm.service", - // "https://www.googleapis.com/auth/userinfo.email" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/sdm.service" // ] // } @@ -1589,8 +1590,8 @@ func (c *EnterprisesStructuresRoomsListCall) Do(opts ...googleapi.CallOption) (* // "$ref": "GoogleHomeEnterpriseSdmV1ListRoomsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/sdm.service", - // "https://www.googleapis.com/auth/userinfo.email" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/sdm.service" // ] // } diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index 162d62b595f..7c845cd3c6a 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -442,7 +442,7 @@ } } }, - "revision": "20230905", + "revision": "20230908", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -1226,7 +1226,7 @@ "type": "array" }, "ttl": { - "description": "Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the ExtendDeviceSession RPC. Default: 3 hours.", + "description": "Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the ExtendDeviceSession RPC. Default: 30 minutes.", "format": "google-duration", "type": "string" } diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index b3f74a70972..c70e4017c89 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -1308,7 +1308,7 @@ type DeviceSession struct { // Ttl: Optional. The amount of time that a device will be initially // allocated for. This can eventually be extended with the - // ExtendDeviceSession RPC. Default: 3 hours. + // ExtendDeviceSession RPC. Default: 30 minutes. Ttl string `json:"ttl,omitempty"` // ServerResponse contains the HTTP response code and headers from the