From cb3f24b55f38fe2b307013857a9a057a178091d3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 16 Oct 2024 00:24:24 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2827) --- aiplatform/v1/aiplatform-api.json | 235 +- aiplatform/v1/aiplatform-gen.go | 371 +- aiplatform/v1beta1/aiplatform-api.json | 381 +- aiplatform/v1beta1/aiplatform-gen.go | 516 +- checks/v1alpha/checks-api.json | 12 +- checks/v1alpha/checks-gen.go | 9 + cloudbilling/v1/cloudbilling-api.json | 6 +- cloudbilling/v1/cloudbilling-gen.go | 13 +- .../v1alpha1/contactcenteraiplatform-api.json | 4 +- .../v1alpha1/contactcenteraiplatform-gen.go | 2 +- dataplex/v1/dataplex-api.json | 42 +- dataplex/v1/dataplex-gen.go | 46 +- discoveryengine/v1/discoveryengine-api.json | 269 +- discoveryengine/v1/discoveryengine-gen.go | 271 + .../v1alpha/discoveryengine-api.json | 417 +- .../v1alpha/discoveryengine-gen.go | 935 +- .../v1beta/discoveryengine-api.json | 264 +- discoveryengine/v1beta/discoveryengine-gen.go | 268 + netapp/v1/netapp-api.json | 4340 ++++++++ netapp/v1/netapp-gen.go | 9357 +++++++++++++++++ netapp/v1beta1/netapp-api.json | 4340 ++++++++ netapp/v1beta1/netapp-gen.go | 9357 +++++++++++++++++ places/v1/places-api.json | 120 +- places/v1/places-gen.go | 146 + .../readerrevenuesubscriptionlinking-api.json | 4 +- .../readerrevenuesubscriptionlinking-gen.go | 4 +- .../v1/recaptchaenterprise-api.json | 19 +- .../v1/recaptchaenterprise-gen.go | 17 +- recommender/v1/recommender-api.json | 13 +- recommender/v1/recommender-gen.go | 6 + sheets/v4/sheets-api.json | 10 +- sheets/v4/sheets-gen.go | 17 +- spanner/v1/spanner-api.json | 113 +- spanner/v1/spanner-gen.go | 153 +- texttospeech/v1/texttospeech-api.json | 117 +- texttospeech/v1/texttospeech-gen.go | 257 - texttospeech/v1beta1/texttospeech-api.json | 119 +- texttospeech/v1beta1/texttospeech-gen.go | 258 - 38 files changed, 31921 insertions(+), 907 deletions(-) create mode 100644 netapp/v1/netapp-api.json create mode 100644 netapp/v1/netapp-gen.go create mode 100644 netapp/v1beta1/netapp-api.json create mode 100644 netapp/v1beta1/netapp-gen.go diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 2e5a5b0ab69..a8f5d532d87 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -4466,6 +4466,34 @@ "resources": { "features": { "methods": { + "batchCreate": { + "description": "Creates a batch of Features in a given FeatureGroup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/featureGroups/{featureGroupsId}/features:batchCreate", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.featureGroups.features.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the EntityType/FeatureGroup to create the batch of Features under. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/features:batchCreate", + "request": { + "$ref": "GoogleCloudAiplatformV1BatchCreateFeaturesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a new Feature in a given FeatureGroup.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/featureGroups/{featureGroupsId}/features", @@ -17846,7 +17874,7 @@ } } }, - "revision": "20241001", + "revision": "20241007", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -17897,6 +17925,10 @@ "$ref": "CloudAiLargeModelsVisionImageRAIScores", "description": "RAI scores for generated image." }, + "imageSize": { + "$ref": "CloudAiLargeModelsVisionImageImageSize", + "description": "Image size. The size of the image. Can be self reported, or computed from the image bytes." + }, "raiInfo": { "$ref": "CloudAiLargeModelsVisionRaiInfo", "description": "RAI info for image." @@ -17916,6 +17948,25 @@ }, "type": "object" }, + "CloudAiLargeModelsVisionImageImageSize": { + "description": "Image size.", + "id": "CloudAiLargeModelsVisionImageImageSize", + "properties": { + "channels": { + "format": "int32", + "type": "integer" + }, + "height": { + "format": "int32", + "type": "integer" + }, + "width": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CloudAiLargeModelsVisionImageRAIScores": { "description": "RAI scores for generated image returned.", "id": "CloudAiLargeModelsVisionImageRAIScores", @@ -20496,6 +20547,10 @@ "description": "The ID of the location to store protected artifacts. e.g. us-central1. Populate only when the location is different than CustomJob location. List of supported locations: https://cloud.google.com/vertex-ai/docs/general/locations", "type": "string" }, + "pscInterfaceConfig": { + "$ref": "GoogleCloudAiplatformV1PscInterfaceConfig", + "description": "Optional. Configuration for PSC-I for CustomJob." + }, "reservedIpRanges": { "description": "Optional. A list of names for the reserved ip ranges under the VPC network that can be used for this job. If set, we will deploy the job within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range'].", "items": { @@ -23839,6 +23894,10 @@ "description": "Configuration for Sync. Only one option is set.", "id": "GoogleCloudAiplatformV1FeatureViewSyncConfig", "properties": { + "continuous": { + "description": "Optional. If true, syncs the FeatureView in a continuous manner to Online Store.", + "type": "boolean" + }, "cron": { "description": "Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: \"CRON_TZ=${IANA_TIME_ZONE}\" or \"TZ=${IANA_TIME_ZONE}\". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, \"CRON_TZ=America/New_York 1 * * * *\", or \"TZ=America/New_York 1 * * * *\".", "type": "string" @@ -24732,6 +24791,10 @@ "description": "Generation config.", "id": "GoogleCloudAiplatformV1GenerationConfig", "properties": { + "audioTimestamp": { + "description": "Optional. If enabled, audio timestamp will be included in the request to the model.", + "type": "boolean" + }, "candidateCount": { "description": "Optional. Number of candidates to generate.", "format": "int32", @@ -30943,6 +31006,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PscInterfaceConfig": { + "description": "Configuration for PSC-I.", + "id": "GoogleCloudAiplatformV1PscInterfaceConfig", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1PublisherModel": { "description": "A Model Garden Publisher Model.", "id": "GoogleCloudAiplatformV1PublisherModel", @@ -32988,7 +33057,7 @@ "type": "string" }, "enum": { - "description": "Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]}", + "description": "Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]}", "items": { "type": "string" }, @@ -34898,6 +34967,162 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SchemaPromptApiSchema": { + "description": "The A2 schema of a prompt.", + "id": "GoogleCloudAiplatformV1SchemaPromptApiSchema", + "properties": { + "apiSchemaVersion": { + "description": "The Schema version that represents changes to the API behavior.", + "type": "string" + }, + "executions": { + "description": "A list of execution instances for constructing a ready-to-use prompt.", + "items": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution" + }, + "type": "array" + }, + "multimodalPrompt": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt", + "description": "Multimodal prompt which embeds preambles to prompt string." + }, + "structuredPrompt": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt", + "description": "The prompt variation that stores preambles in separate fields." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution": { + "description": "A prompt instance's parameters set that contains a set of variable values.", + "id": "GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution", + "properties": { + "arguments": { + "additionalProperties": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue" + }, + "description": "Maps variable names to their value.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue": { + "description": "The value of a variable in prompt.", + "id": "GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue", + "properties": { + "partList": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptSpecPartList", + "description": "The parts of the variable value." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt": { + "description": "Prompt variation that embeds preambles to prompt string.", + "id": "GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt", + "properties": { + "promptMessage": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage", + "description": "The prompt message." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SchemaPromptSpecPartList": { + "description": "A list of elements and information that make up a portion of prompt.", + "id": "GoogleCloudAiplatformV1SchemaPromptSpecPartList", + "properties": { + "parts": { + "description": "A list of elements that can be part of a prompt.", + "items": { + "$ref": "GoogleCloudAiplatformV1Part" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage": { + "description": "The prompt message that aligns with the prompt message in google.cloud.aiplatform.master.GenerateContentRequest.", + "id": "GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage", + "properties": { + "contents": { + "description": "The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.", + "items": { + "$ref": "GoogleCloudAiplatformV1Content" + }, + "type": "array" + }, + "generationConfig": { + "$ref": "GoogleCloudAiplatformV1GenerationConfig", + "description": "Generation config." + }, + "model": { + "description": "The model name.", + "type": "string" + }, + "safetySettings": { + "description": "Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.", + "items": { + "$ref": "GoogleCloudAiplatformV1SafetySetting" + }, + "type": "array" + }, + "systemInstruction": { + "$ref": "GoogleCloudAiplatformV1Content", + "description": "The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph." + }, + "toolConfig": { + "$ref": "GoogleCloudAiplatformV1ToolConfig", + "description": "Tool config. This config is shared for all tools provided in the request." + }, + "tools": { + "description": "A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", + "items": { + "$ref": "GoogleCloudAiplatformV1Tool" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt": { + "description": "Prompt variation that stores preambles in separate fields.", + "id": "GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt", + "properties": { + "context": { + "$ref": "GoogleCloudAiplatformV1Content", + "description": "Preamble: The context of the prompt." + }, + "examples": { + "description": "Preamble: A set of examples for expected model response.", + "items": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptSpecPartList" + }, + "type": "array" + }, + "inputPrefixes": { + "description": "Preamble: The input prefixes before each example input.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputPrefixes": { + "description": "Preamble: The output prefixes before each example output.", + "items": { + "type": "string" + }, + "type": "array" + }, + "promptMessage": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage", + "description": "The prompt message." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1SchemaTablesDatasetMetadata": { "description": "The metadata of Datasets that contain tables data.", "id": "GoogleCloudAiplatformV1SchemaTablesDatasetMetadata", @@ -35039,6 +35264,10 @@ "description": "User-created prompt note. Note size limit is 2KB.", "type": "string" }, + "promptApiSchema": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptApiSchema", + "description": "The API schema of the prompt to support both UI and SDK usages." + }, "promptType": { "description": "Type of the prompt dataset.", "type": "string" @@ -39220,7 +39449,7 @@ "id": "GoogleCloudAiplatformV1ToolParameterKVMatchSpec", "properties": { "useStrictStringMatch": { - "description": "Optional. Whether to use STRCIT string match on parameter values.", + "description": "Optional. Whether to use STRICT string match on parameter values.", "type": "boolean" } }, diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index c119049c271..1fcadfd0326 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -1425,6 +1425,9 @@ type CloudAiLargeModelsVisionImage struct { Image string `json:"image,omitempty"` // ImageRaiScores: RAI scores for generated image. ImageRaiScores *CloudAiLargeModelsVisionImageRAIScores `json:"imageRaiScores,omitempty"` + // ImageSize: Image size. The size of the image. Can be self reported, or + // computed from the image bytes. + ImageSize *CloudAiLargeModelsVisionImageImageSize `json:"imageSize,omitempty"` // RaiInfo: RAI info for image. RaiInfo *CloudAiLargeModelsVisionRaiInfo `json:"raiInfo,omitempty"` // SemanticFilterResponse: Semantic filter info for image. @@ -1451,6 +1454,29 @@ func (s CloudAiLargeModelsVisionImage) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CloudAiLargeModelsVisionImageImageSize: Image size. +type CloudAiLargeModelsVisionImageImageSize struct { + Channels int64 `json:"channels,omitempty"` + Height int64 `json:"height,omitempty"` + Width int64 `json:"width,omitempty"` + // ForceSendFields is a list of field names (e.g. "Channels") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Channels") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudAiLargeModelsVisionImageImageSize) MarshalJSON() ([]byte, error) { + type NoMethod CloudAiLargeModelsVisionImageImageSize + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CloudAiLargeModelsVisionImageRAIScores: RAI scores for generated image // returned. type CloudAiLargeModelsVisionImageRAIScores struct { @@ -5309,6 +5335,8 @@ type GoogleCloudAiplatformV1CustomJobSpec struct { // than CustomJob location. List of supported locations: // https://cloud.google.com/vertex-ai/docs/general/locations ProtectedArtifactLocationId string `json:"protectedArtifactLocationId,omitempty"` + // PscInterfaceConfig: Optional. Configuration for PSC-I for CustomJob. + PscInterfaceConfig *GoogleCloudAiplatformV1PscInterfaceConfig `json:"pscInterfaceConfig,omitempty"` // ReservedIpRanges: Optional. A list of names for the reserved ip ranges under // the VPC network that can be used for this job. If set, we will deploy the // job within the provided ip ranges. Otherwise, the job will be deployed to @@ -9936,6 +9964,9 @@ func (s GoogleCloudAiplatformV1FeatureViewSync) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1FeatureViewSyncConfig: Configuration for Sync. Only // one option is set. type GoogleCloudAiplatformV1FeatureViewSyncConfig struct { + // Continuous: Optional. If true, syncs the FeatureView in a continuous manner + // to Online Store. + Continuous bool `json:"continuous,omitempty"` // Cron: Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled // runs. To explicitly set a timezone to the cron tab, apply a prefix in the // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". The @@ -9943,15 +9974,15 @@ type GoogleCloudAiplatformV1FeatureViewSyncConfig struct { // For example, "CRON_TZ=America/New_York 1 * * * *", or "TZ=America/New_York 1 // * * * *". Cron string `json:"cron,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cron") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Continuous") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cron") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Continuous") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -11380,6 +11411,9 @@ func (s GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata) MarshalJSON // GoogleCloudAiplatformV1GenerationConfig: Generation config. type GoogleCloudAiplatformV1GenerationConfig struct { + // AudioTimestamp: Optional. If enabled, audio timestamp will be included in + // the request to the model. + AudioTimestamp bool `json:"audioTimestamp,omitempty"` // CandidateCount: Optional. Number of candidates to generate. CandidateCount int64 `json:"candidateCount,omitempty"` // FrequencyPenalty: Optional. Frequency penalties. @@ -11419,13 +11453,13 @@ type GoogleCloudAiplatformV1GenerationConfig struct { TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. TopP float64 `json:"topP,omitempty"` - // ForceSendFields is a list of field names (e.g. "CandidateCount") to + // ForceSendFields is a list of field names (e.g. "AudioTimestamp") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CandidateCount") to include in + // NullFields is a list of field names (e.g. "AudioTimestamp") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -19798,6 +19832,10 @@ func (s GoogleCloudAiplatformV1PscAutomatedEndpoints) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PscInterfaceConfig: Configuration for PSC-I. +type GoogleCloudAiplatformV1PscInterfaceConfig struct { +} + // GoogleCloudAiplatformV1PublisherModel: A Model Garden Publisher Model. type GoogleCloudAiplatformV1PublisherModel struct { // Frameworks: Optional. Additional information about the model's Frameworks. @@ -22759,9 +22797,10 @@ type GoogleCloudAiplatformV1Schema struct { Default interface{} `json:"default,omitempty"` // Description: Optional. The description of the data. Description string `json:"description,omitempty"` - // Enum: Optional. Possible values of the element of Type.STRING with enum - // format. For example we can define an Enum Direction as : {type:STRING, - // format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + // Enum: Optional. Possible values of the element of primitive type with enum + // format. Examples: 1. We can define direction as : {type:STRING, format:enum, + // enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as + // : {type:INTEGER, format:enum, enum:["101", "201", "301"]} Enum []string `json:"enum,omitempty"` // Example: Optional. Example of the object. Will only populated when the // object is the root. @@ -25835,6 +25874,205 @@ func (s GoogleCloudAiplatformV1SchemaPredictionResultError) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1SchemaPromptApiSchema: The A2 schema of a prompt. +type GoogleCloudAiplatformV1SchemaPromptApiSchema struct { + // ApiSchemaVersion: The Schema version that represents changes to the API + // behavior. + ApiSchemaVersion string `json:"apiSchemaVersion,omitempty"` + // Executions: A list of execution instances for constructing a ready-to-use + // prompt. + Executions []*GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution `json:"executions,omitempty"` + // MultimodalPrompt: Multimodal prompt which embeds preambles to prompt string. + MultimodalPrompt *GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt `json:"multimodalPrompt,omitempty"` + // StructuredPrompt: The prompt variation that stores preambles in separate + // fields. + StructuredPrompt *GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt `json:"structuredPrompt,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiSchemaVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiSchemaVersion") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SchemaPromptApiSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaPromptApiSchema + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution: A prompt +// instance's parameters set that contains a set of variable values. +type GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution struct { + // Arguments: Maps variable names to their value. + Arguments map[string]GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue `json:"arguments,omitempty"` + // ForceSendFields is a list of field names (e.g. "Arguments") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Arguments") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue: The value of a +// variable in prompt. +type GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue struct { + // PartList: The parts of the variable value. + PartList *GoogleCloudAiplatformV1SchemaPromptSpecPartList `json:"partList,omitempty"` + // ForceSendFields is a list of field names (e.g. "PartList") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PartList") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt: Prompt variation +// that embeds preambles to prompt string. +type GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt struct { + // PromptMessage: The prompt message. + PromptMessage *GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage `json:"promptMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "PromptMessage") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PromptMessage") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SchemaPromptSpecPartList: A list of elements and +// information that make up a portion of prompt. +type GoogleCloudAiplatformV1SchemaPromptSpecPartList struct { + // Parts: A list of elements that can be part of a prompt. + Parts []*GoogleCloudAiplatformV1Part `json:"parts,omitempty"` + // ForceSendFields is a list of field names (e.g. "Parts") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Parts") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SchemaPromptSpecPartList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaPromptSpecPartList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage: The prompt message +// that aligns with the prompt message in +// google.cloud.aiplatform.master.GenerateContentRequest. +type GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage struct { + // Contents: The content of the current conversation with the model. For + // single-turn queries, this is a single instance. For multi-turn queries, this + // is a repeated field that contains conversation history + latest request. + Contents []*GoogleCloudAiplatformV1Content `json:"contents,omitempty"` + // GenerationConfig: Generation config. + GenerationConfig *GoogleCloudAiplatformV1GenerationConfig `json:"generationConfig,omitempty"` + // Model: The model name. + Model string `json:"model,omitempty"` + // SafetySettings: Per request settings for blocking unsafe content. Enforced + // on GenerateContentResponse.candidates. + SafetySettings []*GoogleCloudAiplatformV1SafetySetting `json:"safetySettings,omitempty"` + // SystemInstruction: The user provided system instructions for the model. + // Note: only text should be used in parts and content in each part will be in + // a separate paragraph. + SystemInstruction *GoogleCloudAiplatformV1Content `json:"systemInstruction,omitempty"` + // ToolConfig: Tool config. This config is shared for all tools provided in the + // request. + ToolConfig *GoogleCloudAiplatformV1ToolConfig `json:"toolConfig,omitempty"` + // Tools: A list of `Tools` the model may use to generate the next response. A + // `Tool` is a piece of code that enables the system to interact with external + // systems to perform an action, or set of actions, outside of knowledge and + // scope of the model. + Tools []*GoogleCloudAiplatformV1Tool `json:"tools,omitempty"` + // ForceSendFields is a list of field names (e.g. "Contents") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Contents") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt: Prompt variation +// that stores preambles in separate fields. +type GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt struct { + // Context: Preamble: The context of the prompt. + Context *GoogleCloudAiplatformV1Content `json:"context,omitempty"` + // Examples: Preamble: A set of examples for expected model response. + Examples []*GoogleCloudAiplatformV1SchemaPromptSpecPartList `json:"examples,omitempty"` + // InputPrefixes: Preamble: The input prefixes before each example input. + InputPrefixes []string `json:"inputPrefixes,omitempty"` + // OutputPrefixes: Preamble: The output prefixes before each example output. + OutputPrefixes []string `json:"outputPrefixes,omitempty"` + // PromptMessage: The prompt message. + PromptMessage *GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage `json:"promptMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1SchemaTablesDatasetMetadata: The metadata of Datasets // that contain tables data. type GoogleCloudAiplatformV1SchemaTablesDatasetMetadata struct { @@ -26051,6 +26289,9 @@ type GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata struct { MaxOutputTokens int64 `json:"maxOutputTokens,omitempty,string"` // Note: User-created prompt note. Note size limit is 2KB. Note string `json:"note,omitempty"` + // PromptApiSchema: The API schema of the prompt to support both UI and SDK + // usages. + PromptApiSchema *GoogleCloudAiplatformV1SchemaPromptApiSchema `json:"promptApiSchema,omitempty"` // PromptType: Type of the prompt dataset. PromptType string `json:"promptType,omitempty"` // SeedEnabled: Seeding enables model to return a deterministic response on a @@ -32477,7 +32718,7 @@ func (s GoogleCloudAiplatformV1ToolParameterKVMatchResults) MarshalJSON() ([]byt // GoogleCloudAiplatformV1ToolParameterKVMatchSpec: Spec for tool parameter key // value match metric. type GoogleCloudAiplatformV1ToolParameterKVMatchSpec struct { - // UseStrictStringMatch: Optional. Whether to use STRCIT string match on + // UseStrictStringMatch: Optional. Whether to use STRICT string match on // parameter values. UseStrictStringMatch bool `json:"useStrictStringMatch,omitempty"` // ForceSendFields is a list of field names (e.g. "UseStrictStringMatch") to @@ -49790,6 +50031,112 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Creates a batch of Features in a given FeatureGroup. +// +// - parent: The resource name of the EntityType/FeatureGroup to create the +// batch of Features under. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { + c := &ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchcreatefeaturesrequest = googlecloudaiplatformv1batchcreatefeaturesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcreatefeaturesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features:batchCreate") + 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 "aiplatform.projects.locations.featureGroups.features.batchCreate" call. +// 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 *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) 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 +} + type ProjectsLocationsFeatureGroupsFeaturesCreateCall struct { s *Service parent string diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index a5a00408d2e..95734a54552 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -6165,6 +6165,34 @@ "resources": { "features": { "methods": { + "batchCreate": { + "description": "Creates a batch of Features in a given FeatureGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/featureGroups/{featureGroupsId}/features:batchCreate", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.featureGroups.features.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the EntityType/FeatureGroup to create the batch of Features under. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/features:batchCreate", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1BatchCreateFeaturesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a new Feature in a given FeatureGroup.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/featureGroups/{featureGroupsId}/features", @@ -21202,7 +21230,7 @@ } } }, - "revision": "20241001", + "revision": "20241007", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -21253,6 +21281,10 @@ "$ref": "CloudAiLargeModelsVisionImageRAIScores", "description": "RAI scores for generated image." }, + "imageSize": { + "$ref": "CloudAiLargeModelsVisionImageImageSize", + "description": "Image size. The size of the image. Can be self reported, or computed from the image bytes." + }, "raiInfo": { "$ref": "CloudAiLargeModelsVisionRaiInfo", "description": "RAI info for image." @@ -21272,6 +21304,25 @@ }, "type": "object" }, + "CloudAiLargeModelsVisionImageImageSize": { + "description": "Image size.", + "id": "CloudAiLargeModelsVisionImageImageSize", + "properties": { + "channels": { + "format": "int32", + "type": "integer" + }, + "height": { + "format": "int32", + "type": "integer" + }, + "width": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CloudAiLargeModelsVisionImageRAIScores": { "description": "RAI scores for generated image returned.", "id": "CloudAiLargeModelsVisionImageRAIScores", @@ -24415,6 +24466,10 @@ "description": "The ID of the location to store protected artifacts. e.g. us-central1. Populate only when the location is different than CustomJob location. List of supported locations: https://cloud.google.com/vertex-ai/docs/general/locations", "type": "string" }, + "pscInterfaceConfig": { + "$ref": "GoogleCloudAiplatformV1beta1PscInterfaceConfig", + "description": "Optional. Configuration for PSC-I for CustomJob." + }, "reservedIpRanges": { "description": "Optional. A list of names for the reserved ip ranges under the VPC network that can be used for this job. If set, we will deploy the job within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range'].", "items": { @@ -28238,6 +28293,10 @@ "description": "Configuration for Sync. Only one option is set.", "id": "GoogleCloudAiplatformV1beta1FeatureViewSyncConfig", "properties": { + "continuous": { + "description": "Optional. If true, syncs the FeatureView in a continuous manner to Online Store.", + "type": "boolean" + }, "cron": { "description": "Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: \"CRON_TZ=${IANA_TIME_ZONE}\" or \"TZ=${IANA_TIME_ZONE}\". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, \"CRON_TZ=America/New_York 1 * * * *\", or \"TZ=America/New_York 1 * * * *\".", "type": "string" @@ -29323,6 +29382,10 @@ "description": "Generation config.", "id": "GoogleCloudAiplatformV1beta1GenerationConfig", "properties": { + "audioTimestamp": { + "description": "Optional. If enabled, audio timestamp will be included in the request to the model.", + "type": "boolean" + }, "candidateCount": { "description": "Optional. Number of candidates to generate.", "format": "int32", @@ -35980,6 +36043,10 @@ "description": "Optional. Whether to do component level validations before job creation.", "type": "boolean" }, + "pscInterfaceConfig": { + "$ref": "GoogleCloudAiplatformV1beta1PscInterfaceConfig", + "description": "Optional. Configuration for PSC-I for PipelineJob." + }, "reservedIpRanges": { "description": "A list of names for the reserved ip ranges under the VPC network that can be used for this Pipeline Job's workload. If set, we will deploy the Pipeline Job's workload within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range'].", "items": { @@ -39681,7 +39748,7 @@ "type": "string" }, "enum": { - "description": "Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]}", + "description": "Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]}", "items": { "type": "string" }, @@ -40920,6 +40987,70 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfig": { + "description": "The configuration for grounding checking.", + "id": "GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfig", + "properties": { + "disableAttribution": { + "deprecated": true, + "description": "If set, skip finding claim attributions (i.e not generate grounding citation).", + "type": "boolean" + }, + "sources": { + "description": "The sources for the grounding checking.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfigSourceEntry" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfigSourceEntry": { + "description": "Single source entry for the grounding checking.", + "id": "GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfigSourceEntry", + "properties": { + "enterpriseDatastore": { + "deprecated": true, + "description": "The uri of the Vertex AI Search data source. Deprecated. Use vertex_ai_search_datastore instead.", + "type": "string" + }, + "inlineContext": { + "description": "The grounding text passed inline with the Predict API. It can support up to 1 million bytes.", + "type": "string" + }, + "type": { + "description": "The type of the grounding checking source.", + "enum": [ + "UNSPECIFIED", + "WEB", + "ENTERPRISE", + "VERTEX_AI_SEARCH", + "INLINE" + ], + "enumDeprecated": [ + false, + false, + true, + false, + false + ], + "enumDescriptions": [ + "", + "Uses Web Search to check the grounding.", + "Uses Vertex AI Search to check the grounding. Deprecated. Use VERTEX_AI_SEARCH instead.", + "Uses Vertex AI Search to check the grounding", + "Uses inline context to check the grounding." + ], + "type": "string" + }, + "vertexAiSearchDatastore": { + "description": "The uri of the Vertex AI Search data source.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1SchemaPredictParamsImageClassificationPredictionParams": { "description": "Prediction model parameters for Image Classification.", "id": "GoogleCloudAiplatformV1beta1SchemaPredictParamsImageClassificationPredictionParams", @@ -41527,6 +41658,162 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1SchemaPromptApiSchema": { + "description": "The A2 schema of a prompt.", + "id": "GoogleCloudAiplatformV1beta1SchemaPromptApiSchema", + "properties": { + "apiSchemaVersion": { + "description": "The Schema version that represents changes to the API behavior.", + "type": "string" + }, + "executions": { + "description": "A list of execution instances for constructing a ready-to-use prompt.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPromptInstancePromptExecution" + }, + "type": "array" + }, + "multimodalPrompt": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPromptSpecMultimodalPrompt", + "description": "Multimodal prompt which embeds preambles to prompt string." + }, + "structuredPrompt": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt", + "description": "The prompt variation that stores preambles in separate fields." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SchemaPromptInstancePromptExecution": { + "description": "A prompt instance's parameters set that contains a set of variable values.", + "id": "GoogleCloudAiplatformV1beta1SchemaPromptInstancePromptExecution", + "properties": { + "arguments": { + "additionalProperties": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPromptInstanceVariableValue" + }, + "description": "Maps variable names to their value.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SchemaPromptInstanceVariableValue": { + "description": "The value of a variable in prompt.", + "id": "GoogleCloudAiplatformV1beta1SchemaPromptInstanceVariableValue", + "properties": { + "partList": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList", + "description": "The parts of the variable value." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SchemaPromptSpecMultimodalPrompt": { + "description": "Prompt variation that embeds preambles to prompt string.", + "id": "GoogleCloudAiplatformV1beta1SchemaPromptSpecMultimodalPrompt", + "properties": { + "promptMessage": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage", + "description": "The prompt message." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList": { + "description": "A list of elements and information that make up a portion of prompt.", + "id": "GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList", + "properties": { + "parts": { + "description": "A list of elements that can be part of a prompt.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Part" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage": { + "description": "The prompt message that aligns with the prompt message in google.cloud.aiplatform.master.GenerateContentRequest.", + "id": "GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage", + "properties": { + "contents": { + "description": "The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Content" + }, + "type": "array" + }, + "generationConfig": { + "$ref": "GoogleCloudAiplatformV1beta1GenerationConfig", + "description": "Generation config." + }, + "model": { + "description": "The model name.", + "type": "string" + }, + "safetySettings": { + "description": "Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SafetySetting" + }, + "type": "array" + }, + "systemInstruction": { + "$ref": "GoogleCloudAiplatformV1beta1Content", + "description": "The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph." + }, + "toolConfig": { + "$ref": "GoogleCloudAiplatformV1beta1ToolConfig", + "description": "Tool config. This config is shared for all tools provided in the request." + }, + "tools": { + "description": "A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Tool" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt": { + "description": "Prompt variation that stores preambles in separate fields.", + "id": "GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt", + "properties": { + "context": { + "$ref": "GoogleCloudAiplatformV1beta1Content", + "description": "Preamble: The context of the prompt." + }, + "examples": { + "description": "Preamble: A set of examples for expected model response.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList" + }, + "type": "array" + }, + "inputPrefixes": { + "description": "Preamble: The input prefixes before each example input.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputPrefixes": { + "description": "Preamble: The output prefixes before each example output.", + "items": { + "type": "string" + }, + "type": "array" + }, + "promptMessage": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage", + "description": "The prompt message." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1SchemaTablesDatasetMetadata": { "description": "The metadata of Datasets that contain tables data.", "id": "GoogleCloudAiplatformV1beta1SchemaTablesDatasetMetadata", @@ -41634,6 +41921,94 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1SchemaTextPromptDatasetMetadata": { + "description": "The metadata of Datasets that contain Text Prompt data.", + "id": "GoogleCloudAiplatformV1beta1SchemaTextPromptDatasetMetadata", + "properties": { + "candidateCount": { + "description": "Number of candidates.", + "format": "int64", + "type": "string" + }, + "gcsUri": { + "description": "The Google Cloud Storage URI that stores the prompt data.", + "type": "string" + }, + "groundingConfig": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfig", + "description": "Grounding checking configuration." + }, + "hasPromptVariable": { + "description": "Whether the prompt dataset has prompt variable.", + "type": "boolean" + }, + "logprobs": { + "description": "Whether or not the user has enabled logit probabilities in the model parameters.", + "type": "boolean" + }, + "maxOutputTokens": { + "description": "Value of the maximum number of tokens generated set when the dataset was saved.", + "format": "int64", + "type": "string" + }, + "note": { + "description": "User-created prompt note. Note size limit is 2KB.", + "type": "string" + }, + "promptApiSchema": { + "$ref": "GoogleCloudAiplatformV1beta1SchemaPromptApiSchema", + "description": "The API schema of the prompt to support both UI and SDK usages." + }, + "promptType": { + "description": "Type of the prompt dataset.", + "type": "string" + }, + "seedEnabled": { + "description": "Seeding enables model to return a deterministic response on a best effort basis. Determinism isn't guaranteed. This field determines whether or not seeding is enabled.", + "type": "boolean" + }, + "seedValue": { + "description": "The actual value of the seed.", + "format": "int64", + "type": "string" + }, + "stopSequences": { + "description": "Customized stop sequences.", + "items": { + "type": "string" + }, + "type": "array" + }, + "systemInstruction": { + "description": "The content of the prompt dataset system instruction.", + "type": "string" + }, + "systemInstructionGcsUri": { + "description": "The Google Cloud Storage URI that stores the system instruction, starting with gs://.", + "type": "string" + }, + "temperature": { + "description": "Temperature value used for sampling set when the dataset was saved. This value is used to tune the degree of randomness.", + "format": "float", + "type": "number" + }, + "text": { + "description": "The content of the prompt dataset.", + "type": "string" + }, + "topK": { + "description": "Top K value set when the dataset was saved. This value determines how many candidates with highest probability from the vocab would be selected for each decoding step.", + "format": "int64", + "type": "string" + }, + "topP": { + "description": "Top P value set when the dataset was saved. Given topK tokens for decoding, top candidates will be selected until the sum of their probabilities is topP.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1SchemaTextSegment": { "description": "The text segment inside of DataItem.", "id": "GoogleCloudAiplatformV1beta1SchemaTextSegment", @@ -46120,7 +46495,7 @@ "id": "GoogleCloudAiplatformV1beta1ToolParameterKVMatchSpec", "properties": { "useStrictStringMatch": { - "description": "Optional. Whether to use STRCIT string match on parameter values.", + "description": "Optional. Whether to use STRICT string match on parameter values.", "type": "boolean" } }, diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 4864ffde9c3..4f437fcc387 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -1749,6 +1749,9 @@ type CloudAiLargeModelsVisionImage struct { Image string `json:"image,omitempty"` // ImageRaiScores: RAI scores for generated image. ImageRaiScores *CloudAiLargeModelsVisionImageRAIScores `json:"imageRaiScores,omitempty"` + // ImageSize: Image size. The size of the image. Can be self reported, or + // computed from the image bytes. + ImageSize *CloudAiLargeModelsVisionImageImageSize `json:"imageSize,omitempty"` // RaiInfo: RAI info for image. RaiInfo *CloudAiLargeModelsVisionRaiInfo `json:"raiInfo,omitempty"` // SemanticFilterResponse: Semantic filter info for image. @@ -1775,6 +1778,29 @@ func (s CloudAiLargeModelsVisionImage) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CloudAiLargeModelsVisionImageImageSize: Image size. +type CloudAiLargeModelsVisionImageImageSize struct { + Channels int64 `json:"channels,omitempty"` + Height int64 `json:"height,omitempty"` + Width int64 `json:"width,omitempty"` + // ForceSendFields is a list of field names (e.g. "Channels") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Channels") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudAiLargeModelsVisionImageImageSize) MarshalJSON() ([]byte, error) { + type NoMethod CloudAiLargeModelsVisionImageImageSize + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CloudAiLargeModelsVisionImageRAIScores: RAI scores for generated image // returned. type CloudAiLargeModelsVisionImageRAIScores struct { @@ -6471,6 +6497,8 @@ type GoogleCloudAiplatformV1beta1CustomJobSpec struct { // than CustomJob location. List of supported locations: // https://cloud.google.com/vertex-ai/docs/general/locations ProtectedArtifactLocationId string `json:"protectedArtifactLocationId,omitempty"` + // PscInterfaceConfig: Optional. Configuration for PSC-I for CustomJob. + PscInterfaceConfig *GoogleCloudAiplatformV1beta1PscInterfaceConfig `json:"pscInterfaceConfig,omitempty"` // ReservedIpRanges: Optional. A list of names for the reserved ip ranges under // the VPC network that can be used for this job. If set, we will deploy the // job within the provided ip ranges. Otherwise, the job will be deployed to @@ -11739,6 +11767,9 @@ func (s GoogleCloudAiplatformV1beta1FeatureViewSync) MarshalJSON() ([]byte, erro // GoogleCloudAiplatformV1beta1FeatureViewSyncConfig: Configuration for Sync. // Only one option is set. type GoogleCloudAiplatformV1beta1FeatureViewSyncConfig struct { + // Continuous: Optional. If true, syncs the FeatureView in a continuous manner + // to Online Store. + Continuous bool `json:"continuous,omitempty"` // Cron: Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled // runs. To explicitly set a timezone to the cron tab, apply a prefix in the // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". The @@ -11746,15 +11777,15 @@ type GoogleCloudAiplatformV1beta1FeatureViewSyncConfig struct { // For example, "CRON_TZ=America/New_York 1 * * * *", or "TZ=America/New_York 1 // * * * *". Cron string `json:"cron,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cron") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Continuous") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cron") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Continuous") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -13415,6 +13446,9 @@ func (s GoogleCloudAiplatformV1beta1GenerateVideoResponse) MarshalJSON() ([]byte // GoogleCloudAiplatformV1beta1GenerationConfig: Generation config. type GoogleCloudAiplatformV1beta1GenerationConfig struct { + // AudioTimestamp: Optional. If enabled, audio timestamp will be included in + // the request to the model. + AudioTimestamp bool `json:"audioTimestamp,omitempty"` // CandidateCount: Optional. Number of candidates to generate. CandidateCount int64 `json:"candidateCount,omitempty"` // FrequencyPenalty: Optional. Frequency penalties. @@ -13454,13 +13488,13 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. TopP float64 `json:"topP,omitempty"` - // ForceSendFields is a list of field names (e.g. "CandidateCount") to + // ForceSendFields is a list of field names (e.g. "AudioTimestamp") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CandidateCount") to include in + // NullFields is a list of field names (e.g. "AudioTimestamp") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -22556,6 +22590,8 @@ type GoogleCloudAiplatformV1beta1PipelineJob struct { // PreflightValidations: Optional. Whether to do component level validations // before job creation. PreflightValidations bool `json:"preflightValidations,omitempty"` + // PscInterfaceConfig: Optional. Configuration for PSC-I for PipelineJob. + PscInterfaceConfig *GoogleCloudAiplatformV1beta1PscInterfaceConfig `json:"pscInterfaceConfig,omitempty"` // ReservedIpRanges: A list of names for the reserved ip ranges under the VPC // network that can be used for this Pipeline Job's workload. If set, we will // deploy the Pipeline Job's workload within the provided ip ranges. Otherwise, @@ -27837,9 +27873,10 @@ type GoogleCloudAiplatformV1beta1Schema struct { Default interface{} `json:"default,omitempty"` // Description: Optional. The description of the data. Description string `json:"description,omitempty"` - // Enum: Optional. Possible values of the element of Type.STRING with enum - // format. For example we can define an Enum Direction as : {type:STRING, - // format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + // Enum: Optional. Possible values of the element of primitive type with enum + // format. Examples: 1. We can define direction as : {type:STRING, format:enum, + // enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as + // : {type:INTEGER, format:enum, enum:["101", "201", "301"]} Enum []string `json:"enum,omitempty"` // Example: Optional. Example of the object. Will only populated when the // object is the root. @@ -29770,6 +29807,71 @@ func (s GoogleCloudAiplatformV1beta1SchemaPredictInstanceVideoObjectTrackingPred return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfig: The +// configuration for grounding checking. +type GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfig struct { + // DisableAttribution: If set, skip finding claim attributions (i.e not + // generate grounding citation). + DisableAttribution bool `json:"disableAttribution,omitempty"` + // Sources: The sources for the grounding checking. + Sources []*GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfigSourceEntry `json:"sources,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisableAttribution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisableAttribution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfigSourceEntry: +// Single source entry for the grounding checking. +type GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfigSourceEntry struct { + // EnterpriseDatastore: The uri of the Vertex AI Search data source. + // Deprecated. Use vertex_ai_search_datastore instead. + EnterpriseDatastore string `json:"enterpriseDatastore,omitempty"` + // InlineContext: The grounding text passed inline with the Predict API. It can + // support up to 1 million bytes. + InlineContext string `json:"inlineContext,omitempty"` + // Type: The type of the grounding checking source. + // + // Possible values: + // "UNSPECIFIED" + // "WEB" - Uses Web Search to check the grounding. + // "ENTERPRISE" - Uses Vertex AI Search to check the grounding. Deprecated. + // Use VERTEX_AI_SEARCH instead. + // "VERTEX_AI_SEARCH" - Uses Vertex AI Search to check the grounding + // "INLINE" - Uses inline context to check the grounding. + Type string `json:"type,omitempty"` + // VertexAiSearchDatastore: The uri of the Vertex AI Search data source. + VertexAiSearchDatastore string `json:"vertexAiSearchDatastore,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnterpriseDatastore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnterpriseDatastore") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfigSourceEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfigSourceEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1SchemaPredictParamsImageClassificationPredictionP // arams: Prediction model parameters for Image Classification. type GoogleCloudAiplatformV1beta1SchemaPredictParamsImageClassificationPredictionParams struct { @@ -30845,6 +30947,206 @@ func (s GoogleCloudAiplatformV1beta1SchemaPredictionResultError) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1SchemaPromptApiSchema: The A2 schema of a +// prompt. +type GoogleCloudAiplatformV1beta1SchemaPromptApiSchema struct { + // ApiSchemaVersion: The Schema version that represents changes to the API + // behavior. + ApiSchemaVersion string `json:"apiSchemaVersion,omitempty"` + // Executions: A list of execution instances for constructing a ready-to-use + // prompt. + Executions []*GoogleCloudAiplatformV1beta1SchemaPromptInstancePromptExecution `json:"executions,omitempty"` + // MultimodalPrompt: Multimodal prompt which embeds preambles to prompt string. + MultimodalPrompt *GoogleCloudAiplatformV1beta1SchemaPromptSpecMultimodalPrompt `json:"multimodalPrompt,omitempty"` + // StructuredPrompt: The prompt variation that stores preambles in separate + // fields. + StructuredPrompt *GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt `json:"structuredPrompt,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiSchemaVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiSchemaVersion") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaPromptApiSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaPromptApiSchema + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SchemaPromptInstancePromptExecution: A prompt +// instance's parameters set that contains a set of variable values. +type GoogleCloudAiplatformV1beta1SchemaPromptInstancePromptExecution struct { + // Arguments: Maps variable names to their value. + Arguments map[string]GoogleCloudAiplatformV1beta1SchemaPromptInstanceVariableValue `json:"arguments,omitempty"` + // ForceSendFields is a list of field names (e.g. "Arguments") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Arguments") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaPromptInstancePromptExecution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaPromptInstancePromptExecution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SchemaPromptInstanceVariableValue: The value of +// a variable in prompt. +type GoogleCloudAiplatformV1beta1SchemaPromptInstanceVariableValue struct { + // PartList: The parts of the variable value. + PartList *GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList `json:"partList,omitempty"` + // ForceSendFields is a list of field names (e.g. "PartList") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PartList") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaPromptInstanceVariableValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaPromptInstanceVariableValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SchemaPromptSpecMultimodalPrompt: Prompt +// variation that embeds preambles to prompt string. +type GoogleCloudAiplatformV1beta1SchemaPromptSpecMultimodalPrompt struct { + // PromptMessage: The prompt message. + PromptMessage *GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage `json:"promptMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "PromptMessage") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PromptMessage") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaPromptSpecMultimodalPrompt) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaPromptSpecMultimodalPrompt + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList: A list of elements and +// information that make up a portion of prompt. +type GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList struct { + // Parts: A list of elements that can be part of a prompt. + Parts []*GoogleCloudAiplatformV1beta1Part `json:"parts,omitempty"` + // ForceSendFields is a list of field names (e.g. "Parts") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Parts") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage: The prompt +// message that aligns with the prompt message in +// google.cloud.aiplatform.master.GenerateContentRequest. +type GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage struct { + // Contents: The content of the current conversation with the model. For + // single-turn queries, this is a single instance. For multi-turn queries, this + // is a repeated field that contains conversation history + latest request. + Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` + // GenerationConfig: Generation config. + GenerationConfig *GoogleCloudAiplatformV1beta1GenerationConfig `json:"generationConfig,omitempty"` + // Model: The model name. + Model string `json:"model,omitempty"` + // SafetySettings: Per request settings for blocking unsafe content. Enforced + // on GenerateContentResponse.candidates. + SafetySettings []*GoogleCloudAiplatformV1beta1SafetySetting `json:"safetySettings,omitempty"` + // SystemInstruction: The user provided system instructions for the model. + // Note: only text should be used in parts and content in each part will be in + // a separate paragraph. + SystemInstruction *GoogleCloudAiplatformV1beta1Content `json:"systemInstruction,omitempty"` + // ToolConfig: Tool config. This config is shared for all tools provided in the + // request. + ToolConfig *GoogleCloudAiplatformV1beta1ToolConfig `json:"toolConfig,omitempty"` + // Tools: A list of `Tools` the model may use to generate the next response. A + // `Tool` is a piece of code that enables the system to interact with external + // systems to perform an action, or set of actions, outside of knowledge and + // scope of the model. + Tools []*GoogleCloudAiplatformV1beta1Tool `json:"tools,omitempty"` + // ForceSendFields is a list of field names (e.g. "Contents") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Contents") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt: Prompt +// variation that stores preambles in separate fields. +type GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt struct { + // Context: Preamble: The context of the prompt. + Context *GoogleCloudAiplatformV1beta1Content `json:"context,omitempty"` + // Examples: Preamble: A set of examples for expected model response. + Examples []*GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList `json:"examples,omitempty"` + // InputPrefixes: Preamble: The input prefixes before each example input. + InputPrefixes []string `json:"inputPrefixes,omitempty"` + // OutputPrefixes: Preamble: The output prefixes before each example output. + OutputPrefixes []string `json:"outputPrefixes,omitempty"` + // PromptMessage: The prompt message. + PromptMessage *GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage `json:"promptMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1SchemaTablesDatasetMetadata: The metadata of // Datasets that contain tables data. type GoogleCloudAiplatformV1beta1SchemaTablesDatasetMetadata struct { @@ -31042,6 +31344,90 @@ func (s GoogleCloudAiplatformV1beta1SchemaTextExtractionAnnotation) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1SchemaTextPromptDatasetMetadata: The metadata of +// Datasets that contain Text Prompt data. +type GoogleCloudAiplatformV1beta1SchemaTextPromptDatasetMetadata struct { + // CandidateCount: Number of candidates. + CandidateCount int64 `json:"candidateCount,omitempty,string"` + // GcsUri: The Google Cloud Storage URI that stores the prompt data. + GcsUri string `json:"gcsUri,omitempty"` + // GroundingConfig: Grounding checking configuration. + GroundingConfig *GoogleCloudAiplatformV1beta1SchemaPredictParamsGroundingConfig `json:"groundingConfig,omitempty"` + // HasPromptVariable: Whether the prompt dataset has prompt variable. + HasPromptVariable bool `json:"hasPromptVariable,omitempty"` + // Logprobs: Whether or not the user has enabled logit probabilities in the + // model parameters. + Logprobs bool `json:"logprobs,omitempty"` + // MaxOutputTokens: Value of the maximum number of tokens generated set when + // the dataset was saved. + MaxOutputTokens int64 `json:"maxOutputTokens,omitempty,string"` + // Note: User-created prompt note. Note size limit is 2KB. + Note string `json:"note,omitempty"` + // PromptApiSchema: The API schema of the prompt to support both UI and SDK + // usages. + PromptApiSchema *GoogleCloudAiplatformV1beta1SchemaPromptApiSchema `json:"promptApiSchema,omitempty"` + // PromptType: Type of the prompt dataset. + PromptType string `json:"promptType,omitempty"` + // SeedEnabled: Seeding enables model to return a deterministic response on a + // best effort basis. Determinism isn't guaranteed. This field determines + // whether or not seeding is enabled. + SeedEnabled bool `json:"seedEnabled,omitempty"` + // SeedValue: The actual value of the seed. + SeedValue int64 `json:"seedValue,omitempty,string"` + // StopSequences: Customized stop sequences. + StopSequences []string `json:"stopSequences,omitempty"` + // SystemInstruction: The content of the prompt dataset system instruction. + SystemInstruction string `json:"systemInstruction,omitempty"` + // SystemInstructionGcsUri: The Google Cloud Storage URI that stores the system + // instruction, starting with gs://. + SystemInstructionGcsUri string `json:"systemInstructionGcsUri,omitempty"` + // Temperature: Temperature value used for sampling set when the dataset was + // saved. This value is used to tune the degree of randomness. + Temperature float64 `json:"temperature,omitempty"` + // Text: The content of the prompt dataset. + Text string `json:"text,omitempty"` + // TopK: Top K value set when the dataset was saved. This value determines how + // many candidates with highest probability from the vocab would be selected + // for each decoding step. + TopK int64 `json:"topK,omitempty,string"` + // TopP: Top P value set when the dataset was saved. Given topK tokens for + // decoding, top candidates will be selected until the sum of their + // probabilities is topP. + TopP float64 `json:"topP,omitempty"` + // ForceSendFields is a list of field names (e.g. "CandidateCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CandidateCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SchemaTextPromptDatasetMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaTextPromptDatasetMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1SchemaTextPromptDatasetMetadata) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1SchemaTextPromptDatasetMetadata + var s1 struct { + Temperature gensupport.JSONFloat64 `json:"temperature"` + TopP gensupport.JSONFloat64 `json:"topP"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Temperature = float64(s1.Temperature) + s.TopP = float64(s1.TopP) + return nil +} + // GoogleCloudAiplatformV1beta1SchemaTextSegment: The text segment inside of // DataItem. type GoogleCloudAiplatformV1beta1SchemaTextSegment struct { @@ -37898,7 +38284,7 @@ func (s GoogleCloudAiplatformV1beta1ToolParameterKVMatchResults) MarshalJSON() ( // GoogleCloudAiplatformV1beta1ToolParameterKVMatchSpec: Spec for tool // parameter key value match metric. type GoogleCloudAiplatformV1beta1ToolParameterKVMatchSpec struct { - // UseStrictStringMatch: Optional. Whether to use STRCIT string match on + // UseStrictStringMatch: Optional. Whether to use STRICT string match on // parameter values. UseStrictStringMatch bool `json:"useStrictStringMatch,omitempty"` // ForceSendFields is a list of field names (e.g. "UseStrictStringMatch") to @@ -61792,6 +62178,112 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1batchcreatefeaturesrequest *GoogleCloudAiplatformV1beta1BatchCreateFeaturesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Creates a batch of Features in a given FeatureGroup. +// +// - parent: The resource name of the EntityType/FeatureGroup to create the +// batch of Features under. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1beta1batchcreatefeaturesrequest *GoogleCloudAiplatformV1beta1BatchCreateFeaturesRequest) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { + c := &ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1batchcreatefeaturesrequest = googlecloudaiplatformv1beta1batchcreatefeaturesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1batchcreatefeaturesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/features:batchCreate") + 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 "aiplatform.projects.locations.featureGroups.features.batchCreate" call. +// 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 *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) 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 +} + type ProjectsLocationsFeatureGroupsFeaturesCreateCall struct { s *Service parent string diff --git a/checks/v1alpha/checks-api.json b/checks/v1alpha/checks-api.json index 5bd5ec69989..b247584e9b6 100644 --- a/checks/v1alpha/checks-api.json +++ b/checks/v1alpha/checks-api.json @@ -444,7 +444,7 @@ } } }, - "revision": "20240904", + "revision": "20241013", "rootUrl": "https://checks.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -705,7 +705,10 @@ "DATA_MONITORING_OUTDATED_SDK_VERSION", "DATA_MONITORING_CRITICAL_SDK_ISSUE", "PRIVACY_POLICY_DATA_TYPE_SENSITIVE_INFO", - "DATA_MONITORING_PII_LOGCAT_LEAK" + "DATA_MONITORING_PII_LOGCAT_LEAK", + "DATA_MONITORING_MINIMIZE_PERMISSION_MEDIA", + "DATA_MONITORING_MINIMIZE_PERMISSION_CAMERA", + "DATA_MONITORING_MINIMIZE_PERMISSION_DOCUMENTS" ], "enumDescriptions": [ "Not specified.", @@ -796,7 +799,10 @@ "Checks if there are any outdated SDKs.", "Checks if there are any SDKs with critical issues.", "Checks if the Sensitive Information data type declaration matches usage.", - "Checks if there were any PII leaked to device logs." + "Checks if there were any PII leaked to device logs.", + "Checks if there are media (photo and video) permissions that are considered sensitive and should be minimized for Android.", + "Checks if there are camera use permissions that are considered sensitive and should be minimized for Android.", + "Checks if there are documents and file permissions that are considered sensitive and should be minimized for Android." ], "type": "string" } diff --git a/checks/v1alpha/checks-gen.go b/checks/v1alpha/checks-gen.go index 248288317da..abc6d8ead99 100644 --- a/checks/v1alpha/checks-gen.go +++ b/checks/v1alpha/checks-gen.go @@ -623,6 +623,15 @@ type GoogleChecksReportV1alphaCheck struct { // Information data type declaration matches usage. // "DATA_MONITORING_PII_LOGCAT_LEAK" - Checks if there were any PII leaked to // device logs. + // "DATA_MONITORING_MINIMIZE_PERMISSION_MEDIA" - Checks if there are media + // (photo and video) permissions that are considered sensitive and should be + // minimized for Android. + // "DATA_MONITORING_MINIMIZE_PERMISSION_CAMERA" - Checks if there are camera + // use permissions that are considered sensitive and should be minimized for + // Android. + // "DATA_MONITORING_MINIMIZE_PERMISSION_DOCUMENTS" - Checks if there are + // documents and file permissions that are considered sensitive and should be + // minimized for Android. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Citations") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudbilling/v1/cloudbilling-api.json b/cloudbilling/v1/cloudbilling-api.json index 219270620a9..7e4bfcd82e0 100644 --- a/cloudbilling/v1/cloudbilling-api.json +++ b/cloudbilling/v1/cloudbilling-api.json @@ -751,7 +751,7 @@ } } }, - "revision": "20240517", + "revision": "20241011", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { "AggregationInfo": { @@ -844,6 +844,10 @@ "description": "A billing account in the [Google Cloud Console](https://console.cloud.google.com/). You can assign a billing account to one or more projects.", "id": "BillingAccount", "properties": { + "currencyCode": { + "description": "Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account.", + "type": "string" + }, "displayName": { "description": "The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console.", "type": "string" diff --git a/cloudbilling/v1/cloudbilling-gen.go b/cloudbilling/v1/cloudbilling-gen.go index b594ebef2b5..2499316b4d2 100644 --- a/cloudbilling/v1/cloudbilling-gen.go +++ b/cloudbilling/v1/cloudbilling-gen.go @@ -375,6 +375,15 @@ func (s AuditLogConfig) MarshalJSON() ([]byte, error) { // (https://console.cloud.google.com/). You can assign a billing account to one // or more projects. type BillingAccount struct { + // CurrencyCode: Optional. The currency in which the billing account is billed + // and charged, represented as an ISO 4217 code such as `USD`. Billing account + // currency is determined at the time of billing account creation and cannot be + // updated subsequently, so this field should not be set on update requests. In + // addition, a subaccount always matches the currency of its parent billing + // account, so this field should not be set on subaccount creation requests. + // Clients can read this field to determine the currency of an existing billing + // account. + CurrencyCode string `json:"currencyCode,omitempty"` // DisplayName: The display name given to the billing account, such as `My // Billing Account`. This name is displayed in the Google Cloud Console. DisplayName string `json:"displayName,omitempty"` @@ -402,13 +411,13 @@ type BillingAccount struct { // 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 + // ForceSendFields is a list of field names (e.g. "CurrencyCode") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API + // NullFields is a list of field names (e.g. "CurrencyCode") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json index f4750fa757b..1e69514439b 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json @@ -512,7 +512,7 @@ } } }, - "revision": "20241002", + "revision": "20241009", "rootUrl": "https://contactcenteraiplatform.googleapis.com/", "schemas": { "AdminUser": { @@ -555,7 +555,7 @@ "type": "object" }, "ContactCenter": { - "description": "Message describing ContactCenter object Next ID: 23", + "description": "Message describing ContactCenter object Next ID: 24", "id": "ContactCenter", "properties": { "adminUser": { diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go index a578c4fbe77..95260f0f958 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go @@ -257,7 +257,7 @@ func (s Component) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ContactCenter: Message describing ContactCenter object Next ID: 23 +// ContactCenter: Message describing ContactCenter object Next ID: 24 type ContactCenter struct { // AdminUser: Optional. Info about the first admin user, such as given name and // family name. diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index e0bf6313465..608cc596bb5 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -5997,7 +5997,7 @@ } } }, - "revision": "20240925", + "revision": "20241001", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -6265,6 +6265,10 @@ "format": "google-datetime", "type": "string" }, + "dataVersion": { + "description": "The version of the data format used to produce this data. This field is used to indicated when the underlying data format changes (e.g., schema modifications, changes to the source URL format definition, etc).", + "type": "string" + }, "updateTime": { "description": "The time the aspect was last updated in the source system.", "format": "google-datetime", @@ -7453,7 +7457,7 @@ "id": "GoogleCloudDataplexV1DataQualityDimension", "properties": { "name": { - "description": "The dimension name a rule belongs to. Supported dimensions are \"COMPLETENESS\", \"ACCURACY\", \"CONSISTENCY\", \"VALIDITY\", \"UNIQUENESS\", \"INTEGRITY\"", + "description": "The dimension name a rule belongs to. Supported dimensions are \"COMPLETENESS\", \"ACCURACY\", \"CONSISTENCY\", \"VALIDITY\", \"UNIQUENESS\", \"FRESHNESS\", \"VOLUME\"", "type": "string" } }, @@ -7588,7 +7592,7 @@ "type": "string" }, "dimension": { - "description": "Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are \"COMPLETENESS\", \"ACCURACY\", \"CONSISTENCY\", \"VALIDITY\", \"UNIQUENESS\", \"INTEGRITY\"", + "description": "Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are \"COMPLETENESS\", \"ACCURACY\", \"CONSISTENCY\", \"VALIDITY\", \"UNIQUENESS\", \"FRESHNESS\", \"VOLUME\"", "type": "string" }, "ignoreNull": { @@ -8062,21 +8066,21 @@ }, "dataProfileResult": { "$ref": "GoogleCloudDataplexV1DataProfileResult", - "description": "Output only. The result of the data profile scan.", + "description": "Output only. The result of a data profile scan.", "readOnly": true }, "dataProfileSpec": { "$ref": "GoogleCloudDataplexV1DataProfileSpec", - "description": "DataProfileScan related setting." + "description": "Settings for a data profile scan." }, "dataQualityResult": { "$ref": "GoogleCloudDataplexV1DataQualityResult", - "description": "Output only. The result of the data quality scan.", + "description": "Output only. The result of a data quality scan.", "readOnly": true }, "dataQualitySpec": { "$ref": "GoogleCloudDataplexV1DataQualitySpec", - "description": "DataQualityScan related setting." + "description": "Settings for a data quality scan." }, "description": { "description": "Optional. Description of the scan. Must be between 1-1024 characters.", @@ -8134,9 +8138,9 @@ "DATA_PROFILE" ], "enumDescriptions": [ - "The DataScan type is unspecified.", - "Data Quality scan.", - "Data Profile scan." + "The data scan type is unspecified.", + "Data quality scan.", + "Data profile scan." ], "readOnly": true, "type": "string" @@ -8454,22 +8458,22 @@ }, "dataProfileResult": { "$ref": "GoogleCloudDataplexV1DataProfileResult", - "description": "Output only. The result of the data profile scan.", + "description": "Output only. The result of a data profile scan.", "readOnly": true }, "dataProfileSpec": { "$ref": "GoogleCloudDataplexV1DataProfileSpec", - "description": "Output only. DataProfileScan related setting.", + "description": "Output only. Settings for a data profile scan.", "readOnly": true }, "dataQualityResult": { "$ref": "GoogleCloudDataplexV1DataQualityResult", - "description": "Output only. The result of the data quality scan.", + "description": "Output only. The result of a data quality scan.", "readOnly": true }, "dataQualitySpec": { "$ref": "GoogleCloudDataplexV1DataQualitySpec", - "description": "Output only. DataQualityScan related setting.", + "description": "Output only. Settings for a data quality scan.", "readOnly": true }, "endTime": { @@ -8525,9 +8529,9 @@ "DATA_PROFILE" ], "enumDescriptions": [ - "The DataScan type is unspecified.", - "Data Quality scan.", - "Data Profile scan." + "The data scan type is unspecified.", + "Data quality scan.", + "Data profile scan." ], "readOnly": true, "type": "string" @@ -8694,6 +8698,10 @@ "description": "Details about the action.", "id": "GoogleCloudDataplexV1DiscoveryEventActionDetails", "properties": { + "issue": { + "description": "The human readable issue associated with the action.", + "type": "string" + }, "type": { "description": "The type of action. Eg. IncompatibleDataSchema, InvalidDataFormat", "type": "string" diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index e9595dc1413..1b248ecb08e 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -861,6 +861,10 @@ func (s GoogleCloudDataplexV1Aspect) MarshalJSON() ([]byte, error) { type GoogleCloudDataplexV1AspectSource struct { // CreateTime: The time the aspect was created in the source system. CreateTime string `json:"createTime,omitempty"` + // DataVersion: The version of the data format used to produce this data. This + // field is used to indicated when the underlying data format changes (e.g., + // schema modifications, changes to the source URL format definition, etc). + DataVersion string `json:"dataVersion,omitempty"` // UpdateTime: The time the aspect was last updated in the source system. UpdateTime string `json:"updateTime,omitempty"` // ForceSendFields is a list of field names (e.g. "CreateTime") to @@ -2402,7 +2406,7 @@ func (s *GoogleCloudDataplexV1DataQualityColumnResult) UnmarshalJSON(data []byte type GoogleCloudDataplexV1DataQualityDimension struct { // Name: The dimension name a rule belongs to. Supported dimensions are // "COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - // "INTEGRITY" + // "FRESHNESS", "VOLUME" Name string `json:"name,omitempty"` // 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 @@ -2587,7 +2591,7 @@ type GoogleCloudDataplexV1DataQualityRule struct { Description string `json:"description,omitempty"` // Dimension: Required. The dimension a rule belongs to. Results are also // aggregated at the dimension level. Supported dimensions are "COMPLETENESS", - // "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY" + // "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", "VOLUME" Dimension string `json:"dimension,omitempty"` // IgnoreNull: Optional. Rows with null values will automatically fail a rule, // unless ignore_null is true. In that case, such null rows are trivially @@ -3249,13 +3253,13 @@ type GoogleCloudDataplexV1DataScan struct { CreateTime string `json:"createTime,omitempty"` // Data: Required. The data source for DataScan. Data *GoogleCloudDataplexV1DataSource `json:"data,omitempty"` - // DataProfileResult: Output only. The result of the data profile scan. + // DataProfileResult: Output only. The result of a data profile scan. DataProfileResult *GoogleCloudDataplexV1DataProfileResult `json:"dataProfileResult,omitempty"` - // DataProfileSpec: DataProfileScan related setting. + // DataProfileSpec: Settings for a data profile scan. DataProfileSpec *GoogleCloudDataplexV1DataProfileSpec `json:"dataProfileSpec,omitempty"` - // DataQualityResult: Output only. The result of the data quality scan. + // DataQualityResult: Output only. The result of a data quality scan. DataQualityResult *GoogleCloudDataplexV1DataQualityResult `json:"dataQualityResult,omitempty"` - // DataQualitySpec: DataQualityScan related setting. + // DataQualitySpec: Settings for a data quality scan. DataQualitySpec *GoogleCloudDataplexV1DataQualitySpec `json:"dataQualitySpec,omitempty"` // Description: Optional. Description of the scan. Must be between 1-1024 // characters. @@ -3287,9 +3291,9 @@ type GoogleCloudDataplexV1DataScan struct { // Type: Output only. The type of DataScan. // // Possible values: - // "DATA_SCAN_TYPE_UNSPECIFIED" - The DataScan type is unspecified. - // "DATA_QUALITY" - Data Quality scan. - // "DATA_PROFILE" - Data Profile scan. + // "DATA_SCAN_TYPE_UNSPECIFIED" - The data scan type is unspecified. + // "DATA_QUALITY" - Data quality scan. + // "DATA_PROFILE" - Data profile scan. Type string `json:"type,omitempty"` // Uid: Output only. System generated globally unique ID for the scan. This ID // will be different if the scan is deleted and re-created with the same name. @@ -3676,13 +3680,13 @@ func (s GoogleCloudDataplexV1DataScanExecutionStatus) MarshalJSON() ([]byte, err type GoogleCloudDataplexV1DataScanJob struct { // CreateTime: Output only. The time when the DataScanJob was created. CreateTime string `json:"createTime,omitempty"` - // DataProfileResult: Output only. The result of the data profile scan. + // DataProfileResult: Output only. The result of a data profile scan. DataProfileResult *GoogleCloudDataplexV1DataProfileResult `json:"dataProfileResult,omitempty"` - // DataProfileSpec: Output only. DataProfileScan related setting. + // DataProfileSpec: Output only. Settings for a data profile scan. DataProfileSpec *GoogleCloudDataplexV1DataProfileSpec `json:"dataProfileSpec,omitempty"` - // DataQualityResult: Output only. The result of the data quality scan. + // DataQualityResult: Output only. The result of a data quality scan. DataQualityResult *GoogleCloudDataplexV1DataQualityResult `json:"dataQualityResult,omitempty"` - // DataQualitySpec: Output only. DataQualityScan related setting. + // DataQualitySpec: Output only. Settings for a data quality scan. DataQualitySpec *GoogleCloudDataplexV1DataQualitySpec `json:"dataQualitySpec,omitempty"` // EndTime: Output only. The time when the DataScanJob ended. EndTime string `json:"endTime,omitempty"` @@ -3710,9 +3714,9 @@ type GoogleCloudDataplexV1DataScanJob struct { // Type: Output only. The type of the parent DataScan. // // Possible values: - // "DATA_SCAN_TYPE_UNSPECIFIED" - The DataScan type is unspecified. - // "DATA_QUALITY" - Data Quality scan. - // "DATA_PROFILE" - Data Profile scan. + // "DATA_SCAN_TYPE_UNSPECIFIED" - The data scan type is unspecified. + // "DATA_QUALITY" - Data quality scan. + // "DATA_PROFILE" - Data profile scan. Type string `json:"type,omitempty"` // Uid: Output only. System generated globally unique ID for the DataScanJob. Uid string `json:"uid,omitempty"` @@ -3879,17 +3883,19 @@ func (s GoogleCloudDataplexV1DiscoveryEvent) MarshalJSON() ([]byte, error) { // GoogleCloudDataplexV1DiscoveryEventActionDetails: Details about the action. type GoogleCloudDataplexV1DiscoveryEventActionDetails struct { + // Issue: The human readable issue associated with the action. + Issue string `json:"issue,omitempty"` // Type: The type of action. Eg. IncompatibleDataSchema, InvalidDataFormat Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally + // ForceSendFields is a list of field names (e.g. "Issue") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Issue") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index ce1fa3bb7cc..457c5bc4169 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -271,6 +271,11 @@ "parent" ], "parameters": { + "cmekConfigName": { + "description": "Resource name of the CmekConfig to use for protecting this DataStore.", + "location": "query", + "type": "string" + }, "createAdvancedSiteSearch": { "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", "location": "query", @@ -281,6 +286,11 @@ "location": "query", "type": "string" }, + "disableCmek": { + "description": "DataStore without CMEK protections. If a default CmekConfig is set for the project, setting this field will override the default CmekConfig as well.", + "location": "query", + "type": "boolean" + }, "parent": { "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", "location": "path", @@ -3599,6 +3609,11 @@ "parent" ], "parameters": { + "cmekConfigName": { + "description": "Resource name of the CmekConfig to use for protecting this DataStore.", + "location": "query", + "type": "string" + }, "createAdvancedSiteSearch": { "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", "location": "query", @@ -3609,6 +3624,11 @@ "location": "query", "type": "string" }, + "disableCmek": { + "description": "DataStore without CMEK protections. If a default CmekConfig is set for the project, setting this field will override the default CmekConfig as well.", + "location": "query", + "type": "boolean" + }, "parent": { "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", "location": "path", @@ -5986,7 +6006,7 @@ } } }, - "revision": "20241004", + "revision": "20241010", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6182,7 +6202,8 @@ "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", "CUSTOMER_POLICY_VIOLATION", - "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2", + "LOW_GROUNDED_ANSWER" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -6193,7 +6214,8 @@ "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", - "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent.", + "The low-grounded answer case. Google skips the answer if a well grounded answer was unable to be generated." ], "type": "string" }, @@ -7606,6 +7628,59 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1CmekConfig": { + "description": "Configurations used to enable CMEK data encryption with Cloud KMS keys.", + "id": "GoogleCloudDiscoveryengineV1CmekConfig", + "properties": { + "isDefault": { + "description": "Output only. The default CmekConfig for the Customer.", + "readOnly": true, + "type": "boolean" + }, + "kmsKey": { + "description": "Kms key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.", + "type": "string" + }, + "kmsKeyVersion": { + "description": "Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.", + "type": "string" + }, + "lastRotationTimestampMicros": { + "description": "Output only. The timestamp of the last key rotation.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the CmekConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "KEY_ISSUE", + "DELETING", + "UNUSABLE", + "ACTIVE_ROTATING" + ], + "enumDescriptions": [ + "The CmekConfig state is unknown.", + "The CmekConfig is creating.", + "The CmekConfig can be used with DataStores.", + "The CmekConfig is unavailable, most likely due to the KMS Key being revoked.", + "The CmekConfig is deleting.", + "The CmekConfig is not usable, most likely due to some internal issue.", + "The KMS key version is being rotated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1CompleteQueryResponse": { "description": "Response message for CompletionService.CompleteQuery method.", "id": "GoogleCloudDiscoveryengineV1CompleteQueryResponse", @@ -8225,6 +8300,11 @@ "description": "Output only. Data size estimation for billing.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1CmekConfig", + "description": "Output only. CMEK-related information for the DataStore.", + "readOnly": true + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -8278,6 +8358,10 @@ ], "type": "string" }, + "kmsKeyName": { + "description": "Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.", + "type": "string" + }, "name": { "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" @@ -10280,6 +10364,11 @@ "format": "int32", "type": "integer" }, + "oneBoxPageSize": { + "description": "The maximum number of results to return for OneBox. This applies to each OneBox type individually. Default number is 10.", + "format": "int32", + "type": "integer" + }, "orderBy": { "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering the website search results, see [Order web search results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). For more information on ordering the healthcare search results, see [Order healthcare search results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" @@ -11543,6 +11632,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata": { + "description": "Metadata related to the progress of the CmekConfigService.UpdateCmekConfig operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", @@ -11766,7 +11872,8 @@ "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", "CUSTOMER_POLICY_VIOLATION", - "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2", + "LOW_GROUNDED_ANSWER" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -11777,7 +11884,8 @@ "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", - "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent.", + "The low-grounded answer case. Google skips the answer if a well grounded answer was unable to be generated." ], "type": "string" }, @@ -12263,6 +12371,59 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCmekConfig": { + "description": "Configurations used to enable CMEK data encryption with Cloud KMS keys.", + "id": "GoogleCloudDiscoveryengineV1alphaCmekConfig", + "properties": { + "isDefault": { + "description": "Output only. The default CmekConfig for the Customer.", + "readOnly": true, + "type": "boolean" + }, + "kmsKey": { + "description": "Kms key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.", + "type": "string" + }, + "kmsKeyVersion": { + "description": "Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.", + "type": "string" + }, + "lastRotationTimestampMicros": { + "description": "Output only. The timestamp of the last key rotation.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the CmekConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "KEY_ISSUE", + "DELETING", + "UNUSABLE", + "ACTIVE_ROTATING" + ], + "enumDescriptions": [ + "The CmekConfig state is unknown.", + "The CmekConfig is creating.", + "The CmekConfig can be used with DataStores.", + "The CmekConfig is unavailable, most likely due to the KMS Key being revoked.", + "The CmekConfig is deleting.", + "The CmekConfig is not usable, most likely due to some internal issue.", + "The KMS key version is being rotated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaCondition": { "description": "Defines circumstances to be checked before allowing a behavior", "id": "GoogleCloudDiscoveryengineV1alphaCondition", @@ -12622,6 +12783,11 @@ "description": "Output only. Data size estimation for billing.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig", + "description": "Output only. CMEK-related information for the DataStore.", + "readOnly": true + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -12680,6 +12846,10 @@ ], "type": "string" }, + "kmsKeyName": { + "description": "Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.", + "type": "string" + }, "languageInfo": { "$ref": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", "description": "Language info for DataStore." @@ -14466,6 +14636,11 @@ "format": "int32", "type": "integer" }, + "oneBoxPageSize": { + "description": "The maximum number of results to return for OneBox. This applies to each OneBox type individually. Default number is 10.", + "format": "int32", + "type": "integer" + }, "orderBy": { "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering the website search results, see [Order web search results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). For more information on ordering the healthcare search results, see [Order healthcare search results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" @@ -15395,6 +15570,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata": { + "description": "Metadata related to the progress of the CmekConfigService.UpdateCmekConfig operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", @@ -15518,6 +15710,59 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCmekConfig": { + "description": "Configurations used to enable CMEK data encryption with Cloud KMS keys.", + "id": "GoogleCloudDiscoveryengineV1betaCmekConfig", + "properties": { + "isDefault": { + "description": "Output only. The default CmekConfig for the Customer.", + "readOnly": true, + "type": "boolean" + }, + "kmsKey": { + "description": "Kms key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.", + "type": "string" + }, + "kmsKeyVersion": { + "description": "Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.", + "type": "string" + }, + "lastRotationTimestampMicros": { + "description": "Output only. The timestamp of the last key rotation.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the CmekConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "KEY_ISSUE", + "DELETING", + "UNUSABLE", + "ACTIVE_ROTATING" + ], + "enumDescriptions": [ + "The CmekConfig state is unknown.", + "The CmekConfig is creating.", + "The CmekConfig can be used with DataStores.", + "The CmekConfig is unavailable, most likely due to the KMS Key being revoked.", + "The CmekConfig is deleting.", + "The CmekConfig is not usable, most likely due to some internal issue.", + "The KMS key version is being rotated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCondition": { "description": "Defines circumstances to be checked before allowing a behavior", "id": "GoogleCloudDiscoveryengineV1betaCondition", @@ -15862,6 +16107,11 @@ "description": "Output only. Data size estimation for billing.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaCmekConfig", + "description": "Output only. CMEK-related information for the DataStore.", + "readOnly": true + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -15915,6 +16165,10 @@ ], "type": "string" }, + "kmsKeyName": { + "description": "Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.", + "type": "string" + }, "languageInfo": { "$ref": "GoogleCloudDiscoveryengineV1betaLanguageInfo", "description": "Language info for DataStore." @@ -17134,6 +17388,11 @@ "format": "int32", "type": "integer" }, + "oneBoxPageSize": { + "description": "The maximum number of results to return for OneBox. This applies to each OneBox type individually. Default number is 10.", + "format": "int32", + "type": "integer" + }, "orderBy": { "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering the website search results, see [Order web search results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). For more information on ordering the healthcare search results, see [Order healthcare search results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 2a53fe6a425..6be2510ad4d 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -1168,6 +1168,8 @@ type GoogleCloudDiscoveryengineV1Answer struct { // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query // ignored case. Google skips the answer if the query doesn't have clear // intent. + // "LOW_GROUNDED_ANSWER" - The low-grounded answer case. Google skips the + // answer if a well grounded answer was unable to be generated. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -3129,6 +3131,56 @@ func (s GoogleCloudDiscoveryengineV1CloudSqlSource) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1CmekConfig: Configurations used to enable CMEK +// data encryption with Cloud KMS keys. +type GoogleCloudDiscoveryengineV1CmekConfig struct { + // IsDefault: Output only. The default CmekConfig for the Customer. + IsDefault bool `json:"isDefault,omitempty"` + // KmsKey: Kms key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId + // }`. + KmsKey string `json:"kmsKey,omitempty"` + // KmsKeyVersion: Kms key version resource name which will be used to encrypt + // resources `/cryptoKeyVersions/{keyVersion}`. + KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` + // LastRotationTimestampMicros: Output only. The timestamp of the last key + // rotation. + LastRotationTimestampMicros int64 `json:"lastRotationTimestampMicros,omitempty,string"` + // Name: Required. Name of the CmekConfig, of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the CmekConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The CmekConfig state is unknown. + // "CREATING" - The CmekConfig is creating. + // "ACTIVE" - The CmekConfig can be used with DataStores. + // "KEY_ISSUE" - The CmekConfig is unavailable, most likely due to the KMS + // Key being revoked. + // "DELETING" - The CmekConfig is deleting. + // "UNUSABLE" - The CmekConfig is not usable, most likely due to some + // internal issue. + // "ACTIVE_ROTATING" - The KMS key version is being rotated. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1CmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CmekConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1CompleteQueryResponse: Response message for // CompletionService.CompleteQuery method. type GoogleCloudDiscoveryengineV1CompleteQueryResponse struct { @@ -3991,6 +4043,8 @@ func (s GoogleCloudDiscoveryengineV1CustomTuningModel) MarshalJSON() ([]byte, er type GoogleCloudDiscoveryengineV1DataStore struct { // BillingEstimation: Output only. Data size estimation for billing. BillingEstimation *GoogleCloudDiscoveryengineV1DataStoreBillingEstimation `json:"billingEstimation,omitempty"` + // CmekConfig: Output only. CMEK-related information for the DataStore. + CmekConfig *GoogleCloudDiscoveryengineV1CmekConfig `json:"cmekConfig,omitempty"` // ContentConfig: Immutable. The content config of the data store. If this // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // @@ -4024,6 +4078,12 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // "MEDIA" - The media industry vertical. // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. IndustryVertical string `json:"industryVertical,omitempty"` + // KmsKeyName: Input only. The KMS key to be used to protect this DataStore at + // creation time. Must be set for requests that need to comply with CMEK Org + // Policy protections. If this field is set and processed successfully, the + // DataStore will be protected by the KMS key, as indicated in the cmek_config + // field. + KmsKeyName string `json:"kmsKeyName,omitempty"` // Name: Immutable. The full resource name of the data store. Format: // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length @@ -6941,6 +7001,9 @@ type GoogleCloudDiscoveryengineV1SearchRequest struct { // relevant) in search results. This field is only considered if page_token is // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. Offset int64 `json:"offset,omitempty"` + // OneBoxPageSize: The maximum number of results to return for OneBox. This + // applies to each OneBox type individually. Default number is 10. + OneBoxPageSize int64 `json:"oneBoxPageSize,omitempty"` // OrderBy: The order in which documents are returned. Documents can be ordered // by a field in an Document object. Leave it unset if ordered by relevance. // `order_by` expression is case-sensitive. For more information on ordering @@ -8894,6 +8957,33 @@ func (s *GoogleCloudDiscoveryengineV1TransactionInfo) UnmarshalJSON(data []byte) return nil } +// GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata: Metadata related to +// the progress of the CmekConfigService.UpdateCmekConfig operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1UpdateSchemaMetadata: Metadata for UpdateSchema // LRO. type GoogleCloudDiscoveryengineV1UpdateSchemaMetadata struct { @@ -9234,6 +9324,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query // ignored case. Google skips the answer if the query doesn't have clear // intent. + // "LOW_GROUNDED_ANSWER" - The low-grounded answer case. Google skips the + // answer if a well grounded answer was unable to be generated. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -9852,6 +9944,56 @@ func (s GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCmekConfig: Configurations used to enable +// CMEK data encryption with Cloud KMS keys. +type GoogleCloudDiscoveryengineV1alphaCmekConfig struct { + // IsDefault: Output only. The default CmekConfig for the Customer. + IsDefault bool `json:"isDefault,omitempty"` + // KmsKey: Kms key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId + // }`. + KmsKey string `json:"kmsKey,omitempty"` + // KmsKeyVersion: Kms key version resource name which will be used to encrypt + // resources `/cryptoKeyVersions/{keyVersion}`. + KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` + // LastRotationTimestampMicros: Output only. The timestamp of the last key + // rotation. + LastRotationTimestampMicros int64 `json:"lastRotationTimestampMicros,omitempty,string"` + // Name: Required. Name of the CmekConfig, of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the CmekConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The CmekConfig state is unknown. + // "CREATING" - The CmekConfig is creating. + // "ACTIVE" - The CmekConfig can be used with DataStores. + // "KEY_ISSUE" - The CmekConfig is unavailable, most likely due to the KMS + // Key being revoked. + // "DELETING" - The CmekConfig is deleting. + // "UNUSABLE" - The CmekConfig is not usable, most likely due to some + // internal issue. + // "ACTIVE_ROTATING" - The KMS key version is being rotated. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaCmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCmekConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaCondition: Defines circumstances to be // checked before allowing a behavior type GoogleCloudDiscoveryengineV1alphaCondition struct { @@ -10335,6 +10477,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { AclEnabled bool `json:"aclEnabled,omitempty"` // BillingEstimation: Output only. Data size estimation for billing. BillingEstimation *GoogleCloudDiscoveryengineV1alphaDataStoreBillingEstimation `json:"billingEstimation,omitempty"` + // CmekConfig: Output only. CMEK-related information for the DataStore. + CmekConfig *GoogleCloudDiscoveryengineV1alphaCmekConfig `json:"cmekConfig,omitempty"` // ContentConfig: Immutable. The content config of the data store. If this // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // @@ -10370,6 +10514,12 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // "MEDIA" - The media industry vertical. // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. IndustryVertical string `json:"industryVertical,omitempty"` + // KmsKeyName: Input only. The KMS key to be used to protect this DataStore at + // creation time. Must be set for requests that need to comply with CMEK Org + // Policy protections. If this field is set and processed successfully, the + // DataStore will be protected by the KMS key, as indicated in the cmek_config + // field. + KmsKeyName string `json:"kmsKeyName,omitempty"` // LanguageInfo: Language info for DataStore. LanguageInfo *GoogleCloudDiscoveryengineV1alphaLanguageInfo `json:"languageInfo,omitempty"` // Name: Immutable. The full resource name of the data store. Format: @@ -12745,6 +12895,9 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // relevant) in search results. This field is only considered if page_token is // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. Offset int64 `json:"offset,omitempty"` + // OneBoxPageSize: The maximum number of results to return for OneBox. This + // applies to each OneBox type individually. Default number is 10. + OneBoxPageSize int64 `json:"oneBoxPageSize,omitempty"` // OrderBy: The order in which documents are returned. Documents can be ordered // by a field in an Document object. Leave it unset if ordered by relevance. // `order_by` expression is case-sensitive. For more information on ordering @@ -14209,6 +14362,33 @@ func (s GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]by type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { } +// GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata: Metadata related +// to the progress of the CmekConfigService.UpdateCmekConfig operation. This +// will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for // UpdateSchema LRO. type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { @@ -14391,6 +14571,56 @@ func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaCmekConfig: Configurations used to enable +// CMEK data encryption with Cloud KMS keys. +type GoogleCloudDiscoveryengineV1betaCmekConfig struct { + // IsDefault: Output only. The default CmekConfig for the Customer. + IsDefault bool `json:"isDefault,omitempty"` + // KmsKey: Kms key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId + // }`. + KmsKey string `json:"kmsKey,omitempty"` + // KmsKeyVersion: Kms key version resource name which will be used to encrypt + // resources `/cryptoKeyVersions/{keyVersion}`. + KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` + // LastRotationTimestampMicros: Output only. The timestamp of the last key + // rotation. + LastRotationTimestampMicros int64 `json:"lastRotationTimestampMicros,omitempty,string"` + // Name: Required. Name of the CmekConfig, of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the CmekConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The CmekConfig state is unknown. + // "CREATING" - The CmekConfig is creating. + // "ACTIVE" - The CmekConfig can be used with DataStores. + // "KEY_ISSUE" - The CmekConfig is unavailable, most likely due to the KMS + // Key being revoked. + // "DELETING" - The CmekConfig is deleting. + // "UNUSABLE" - The CmekConfig is not usable, most likely due to some + // internal issue. + // "ACTIVE_ROTATING" - The KMS key version is being rotated. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaCmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCmekConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaCondition: Defines circumstances to be // checked before allowing a behavior type GoogleCloudDiscoveryengineV1betaCondition struct { @@ -14842,6 +15072,8 @@ func (s GoogleCloudDiscoveryengineV1betaCustomTuningModel) MarshalJSON() ([]byte type GoogleCloudDiscoveryengineV1betaDataStore struct { // BillingEstimation: Output only. Data size estimation for billing. BillingEstimation *GoogleCloudDiscoveryengineV1betaDataStoreBillingEstimation `json:"billingEstimation,omitempty"` + // CmekConfig: Output only. CMEK-related information for the DataStore. + CmekConfig *GoogleCloudDiscoveryengineV1betaCmekConfig `json:"cmekConfig,omitempty"` // ContentConfig: Immutable. The content config of the data store. If this // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // @@ -14875,6 +15107,12 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // "MEDIA" - The media industry vertical. // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. IndustryVertical string `json:"industryVertical,omitempty"` + // KmsKeyName: Input only. The KMS key to be used to protect this DataStore at + // creation time. Must be set for requests that need to comply with CMEK Org + // Policy protections. If this field is set and processed successfully, the + // DataStore will be protected by the KMS key, as indicated in the cmek_config + // field. + KmsKeyName string `json:"kmsKeyName,omitempty"` // LanguageInfo: Language info for DataStore. LanguageInfo *GoogleCloudDiscoveryengineV1betaLanguageInfo `json:"languageInfo,omitempty"` // Name: Immutable. The full resource name of the data store. Format: @@ -16519,6 +16757,9 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // relevant) in search results. This field is only considered if page_token is // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. Offset int64 `json:"offset,omitempty"` + // OneBoxPageSize: The maximum number of results to return for OneBox. This + // applies to each OneBox type individually. Default number is 10. + OneBoxPageSize int64 `json:"oneBoxPageSize,omitempty"` // OrderBy: The order in which documents are returned. Documents can be ordered // by a field in an Document object. Leave it unset if ordered by relevance. // `order_by` expression is case-sensitive. For more information on ordering @@ -18727,6 +18968,13 @@ func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, go return c } +// CmekConfigName sets the optional parameter "cmekConfigName": Resource name +// of the CmekConfig to use for protecting this DataStore. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CmekConfigName(cmekConfigName string) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("cmekConfigName", cmekConfigName) + return c +} + // CreateAdvancedSiteSearch sets the optional parameter // "createAdvancedSiteSearch": A boolean flag indicating whether user want to // directly create an advanced data store for site search. If the data store is @@ -18747,6 +18995,14 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStore return c } +// DisableCmek sets the optional parameter "disableCmek": DataStore without +// CMEK protections. If a default CmekConfig is set for the project, setting +// this field will override the default CmekConfig as well. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DisableCmek(disableCmek bool) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("disableCmek", fmt.Sprint(disableCmek)) + return c +} + // SkipDefaultSchemaCreation sets the optional parameter // "skipDefaultSchemaCreation": A boolean flag indicating whether to skip the // default schema creation for the data store. Only enable this flag if you are @@ -30965,6 +31221,13 @@ func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddi return c } +// CmekConfigName sets the optional parameter "cmekConfigName": Resource name +// of the CmekConfig to use for protecting this DataStore. +func (c *ProjectsLocationsDataStoresCreateCall) CmekConfigName(cmekConfigName string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("cmekConfigName", cmekConfigName) + return c +} + // CreateAdvancedSiteSearch sets the optional parameter // "createAdvancedSiteSearch": A boolean flag indicating whether user want to // directly create an advanced data store for site search. If the data store is @@ -30985,6 +31248,14 @@ func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) return c } +// DisableCmek sets the optional parameter "disableCmek": DataStore without +// CMEK protections. If a default CmekConfig is set for the project, setting +// this field will override the default CmekConfig as well. +func (c *ProjectsLocationsDataStoresCreateCall) DisableCmek(disableCmek bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("disableCmek", fmt.Sprint(disableCmek)) + return c +} + // SkipDefaultSchemaCreation sets the optional parameter // "skipDefaultSchemaCreation": A boolean flag indicating whether to skip the // default schema creation for the data store. Only enable this flag if you are diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 41edac4a738..723542c7d3e 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -245,6 +245,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getCmekConfig": { + "description": "Gets the CmekConfig.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/cmekConfig", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.getCmekConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of CmekConfig, such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the CmekConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cmekConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "updateAclConfig": { "description": "Default ACL configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", @@ -272,9 +297,129 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateCmekConfig": { + "description": "Provisions a CMEK key for use in a location of a customer's project. This method will also conduct location validation on the provided cmekConfig to make sure the key is valid and can be used in the selected location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/cmekConfig", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.updateCmekConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cmekConfig$", + "required": true, + "type": "string" + }, + "setDefault": { + "description": "Set the following CmekConfig as the default to be used for child resources if one is not specified.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { + "cmekConfigs": { + "methods": { + "get": { + "description": "Gets the CmekConfig.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/cmekConfigs/{cmekConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.cmekConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of CmekConfig, such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the CmekConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cmekConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the CmekConfigs with the project.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/cmekConfigs", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.cmekConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list CmekConfigs under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/cmekConfigs", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Provisions a CMEK key for use in a location of a customer's project. This method will also conduct location validation on the provided cmekConfig to make sure the key is valid and can be used in the selected location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/cmekConfigs/{cmekConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.cmekConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cmekConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "setDefault": { + "description": "Set the following CmekConfig as the default to be used for child resources if one is not specified.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "collections": { "resources": { "dataConnector": { @@ -407,6 +552,11 @@ "parent" ], "parameters": { + "cmekConfigName": { + "description": "Resource name of the CmekConfig to use for protecting this DataStore.", + "location": "query", + "type": "string" + }, "createAdvancedSiteSearch": { "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", "location": "query", @@ -417,6 +567,11 @@ "location": "query", "type": "string" }, + "disableCmek": { + "description": "DataStore without CMEK protections. If a default CmekConfig is set for the project, setting this field will override the default CmekConfig as well.", + "location": "query", + "type": "boolean" + }, "parent": { "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", "location": "path", @@ -4243,6 +4398,11 @@ "parent" ], "parameters": { + "cmekConfigName": { + "description": "Resource name of the CmekConfig to use for protecting this DataStore.", + "location": "query", + "type": "string" + }, "createAdvancedSiteSearch": { "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", "location": "query", @@ -4253,6 +4413,11 @@ "location": "query", "type": "string" }, + "disableCmek": { + "description": "DataStore without CMEK protections. If a default CmekConfig is set for the project, setting this field will override the default CmekConfig as well.", + "location": "query", + "type": "boolean" + }, "parent": { "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", "location": "path", @@ -7517,7 +7682,7 @@ } } }, - "revision": "20241004", + "revision": "20241010", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -7883,6 +8048,59 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1CmekConfig": { + "description": "Configurations used to enable CMEK data encryption with Cloud KMS keys.", + "id": "GoogleCloudDiscoveryengineV1CmekConfig", + "properties": { + "isDefault": { + "description": "Output only. The default CmekConfig for the Customer.", + "readOnly": true, + "type": "boolean" + }, + "kmsKey": { + "description": "Kms key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.", + "type": "string" + }, + "kmsKeyVersion": { + "description": "Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.", + "type": "string" + }, + "lastRotationTimestampMicros": { + "description": "Output only. The timestamp of the last key rotation.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the CmekConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "KEY_ISSUE", + "DELETING", + "UNUSABLE", + "ACTIVE_ROTATING" + ], + "enumDescriptions": [ + "The CmekConfig state is unknown.", + "The CmekConfig is creating.", + "The CmekConfig can be used with DataStores.", + "The CmekConfig is unavailable, most likely due to the KMS Key being revoked.", + "The CmekConfig is deleting.", + "The CmekConfig is not usable, most likely due to some internal issue.", + "The KMS key version is being rotated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1Condition": { "description": "Defines circumstances to be checked before allowing a behavior", "id": "GoogleCloudDiscoveryengineV1Condition", @@ -8154,6 +8372,11 @@ "description": "Output only. Data size estimation for billing.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1CmekConfig", + "description": "Output only. CMEK-related information for the DataStore.", + "readOnly": true + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -8207,6 +8430,10 @@ ], "type": "string" }, + "kmsKeyName": { + "description": "Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.", + "type": "string" + }, "name": { "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" @@ -9304,6 +9531,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata": { + "description": "Metadata related to the progress of the CmekConfigService.UpdateCmekConfig operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", @@ -9443,7 +9687,8 @@ "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", "CUSTOMER_POLICY_VIOLATION", - "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2", + "LOW_GROUNDED_ANSWER" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -9454,7 +9699,8 @@ "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", - "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent.", + "The low-grounded answer case. Google skips the answer if a well grounded answer was unable to be generated." ], "type": "string" }, @@ -10964,6 +11210,59 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCmekConfig": { + "description": "Configurations used to enable CMEK data encryption with Cloud KMS keys.", + "id": "GoogleCloudDiscoveryengineV1alphaCmekConfig", + "properties": { + "isDefault": { + "description": "Output only. The default CmekConfig for the Customer.", + "readOnly": true, + "type": "boolean" + }, + "kmsKey": { + "description": "Kms key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.", + "type": "string" + }, + "kmsKeyVersion": { + "description": "Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.", + "type": "string" + }, + "lastRotationTimestampMicros": { + "description": "Output only. The timestamp of the last key rotation.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the CmekConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "KEY_ISSUE", + "DELETING", + "UNUSABLE", + "ACTIVE_ROTATING" + ], + "enumDescriptions": [ + "The CmekConfig state is unknown.", + "The CmekConfig is creating.", + "The CmekConfig can be used with DataStores.", + "The CmekConfig is unavailable, most likely due to the KMS Key being revoked.", + "The CmekConfig is deleting.", + "The CmekConfig is not usable, most likely due to some internal issue.", + "The KMS key version is being rotated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse": { "description": "Response message for CompletionService.CompleteQuery method.", "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse", @@ -11611,6 +11910,11 @@ "description": "Output only. Data size estimation for billing.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig", + "description": "Output only. CMEK-related information for the DataStore.", + "readOnly": true + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -11669,6 +11973,10 @@ ], "type": "string" }, + "kmsKeyName": { + "description": "Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.", + "type": "string" + }, "languageInfo": { "$ref": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", "description": "Language info for DataStore." @@ -13577,6 +13885,20 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse": { + "description": "Response message for CmekConfigService.ListCmekConfigs method.", + "id": "GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse", + "properties": { + "cmekConfigs": { + "description": "All the customer's CmekConfigs.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListControlsResponse": { "description": "Response for ListControls method.", "id": "GoogleCloudDiscoveryengineV1alphaListControlsResponse", @@ -15063,6 +15385,11 @@ "format": "int32", "type": "integer" }, + "oneBoxPageSize": { + "description": "The maximum number of results to return for OneBox. This applies to each OneBox type individually. Default number is 10.", + "format": "int32", + "type": "integer" + }, "orderBy": { "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering the website search results, see [Order web search results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). For more information on ordering the healthcare search results, see [Order healthcare search results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" @@ -16987,6 +17314,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata": { + "description": "Metadata related to the progress of the CmekConfigService.UpdateCmekConfig operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", @@ -17210,6 +17554,59 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCmekConfig": { + "description": "Configurations used to enable CMEK data encryption with Cloud KMS keys.", + "id": "GoogleCloudDiscoveryengineV1betaCmekConfig", + "properties": { + "isDefault": { + "description": "Output only. The default CmekConfig for the Customer.", + "readOnly": true, + "type": "boolean" + }, + "kmsKey": { + "description": "Kms key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.", + "type": "string" + }, + "kmsKeyVersion": { + "description": "Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.", + "type": "string" + }, + "lastRotationTimestampMicros": { + "description": "Output only. The timestamp of the last key rotation.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the CmekConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "KEY_ISSUE", + "DELETING", + "UNUSABLE", + "ACTIVE_ROTATING" + ], + "enumDescriptions": [ + "The CmekConfig state is unknown.", + "The CmekConfig is creating.", + "The CmekConfig can be used with DataStores.", + "The CmekConfig is unavailable, most likely due to the KMS Key being revoked.", + "The CmekConfig is deleting.", + "The CmekConfig is not usable, most likely due to some internal issue.", + "The KMS key version is being rotated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCondition": { "description": "Defines circumstances to be checked before allowing a behavior", "id": "GoogleCloudDiscoveryengineV1betaCondition", @@ -17554,6 +17951,11 @@ "description": "Output only. Data size estimation for billing.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaCmekConfig", + "description": "Output only. CMEK-related information for the DataStore.", + "readOnly": true + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -17607,6 +18009,10 @@ ], "type": "string" }, + "kmsKeyName": { + "description": "Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.", + "type": "string" + }, "languageInfo": { "$ref": "GoogleCloudDiscoveryengineV1betaLanguageInfo", "description": "Language info for DataStore." @@ -18826,6 +19232,11 @@ "format": "int32", "type": "integer" }, + "oneBoxPageSize": { + "description": "The maximum number of results to return for OneBox. This applies to each OneBox type individually. Default number is 10.", + "format": "int32", + "type": "integer" + }, "orderBy": { "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering the website search results, see [Order web search results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). For more information on ordering the healthcare search results, see [Order healthcare search results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index aba1d1ed799..43fb5961628 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -171,6 +171,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.CmekConfigs = NewProjectsLocationsCmekConfigsService(s) rs.Collections = NewProjectsLocationsCollectionsService(s) rs.DataStores = NewProjectsLocationsDataStoresService(s) rs.Evaluations = NewProjectsLocationsEvaluationsService(s) @@ -188,6 +189,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + CmekConfigs *ProjectsLocationsCmekConfigsService + Collections *ProjectsLocationsCollectionsService DataStores *ProjectsLocationsDataStoresService @@ -211,6 +214,15 @@ type ProjectsLocationsService struct { UserStores *ProjectsLocationsUserStoresService } +func NewProjectsLocationsCmekConfigsService(s *Service) *ProjectsLocationsCmekConfigsService { + rs := &ProjectsLocationsCmekConfigsService{s: s} + return rs +} + +type ProjectsLocationsCmekConfigsService struct { + s *Service +} + func NewProjectsLocationsCollectionsService(s *Service) *ProjectsLocationsCollectionsService { rs := &ProjectsLocationsCollectionsService{s: s} rs.DataConnector = NewProjectsLocationsCollectionsDataConnectorService(s) @@ -1659,6 +1671,56 @@ func (s GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1CmekConfig: Configurations used to enable CMEK +// data encryption with Cloud KMS keys. +type GoogleCloudDiscoveryengineV1CmekConfig struct { + // IsDefault: Output only. The default CmekConfig for the Customer. + IsDefault bool `json:"isDefault,omitempty"` + // KmsKey: Kms key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId + // }`. + KmsKey string `json:"kmsKey,omitempty"` + // KmsKeyVersion: Kms key version resource name which will be used to encrypt + // resources `/cryptoKeyVersions/{keyVersion}`. + KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` + // LastRotationTimestampMicros: Output only. The timestamp of the last key + // rotation. + LastRotationTimestampMicros int64 `json:"lastRotationTimestampMicros,omitempty,string"` + // Name: Required. Name of the CmekConfig, of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the CmekConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The CmekConfig state is unknown. + // "CREATING" - The CmekConfig is creating. + // "ACTIVE" - The CmekConfig can be used with DataStores. + // "KEY_ISSUE" - The CmekConfig is unavailable, most likely due to the KMS + // Key being revoked. + // "DELETING" - The CmekConfig is deleting. + // "UNUSABLE" - The CmekConfig is not usable, most likely due to some + // internal issue. + // "ACTIVE_ROTATING" - The KMS key version is being rotated. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1CmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CmekConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1Condition: Defines circumstances to be checked // before allowing a behavior type GoogleCloudDiscoveryengineV1Condition struct { @@ -2051,6 +2113,8 @@ func (s GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata) MarshalJSON() ([]b type GoogleCloudDiscoveryengineV1DataStore struct { // BillingEstimation: Output only. Data size estimation for billing. BillingEstimation *GoogleCloudDiscoveryengineV1DataStoreBillingEstimation `json:"billingEstimation,omitempty"` + // CmekConfig: Output only. CMEK-related information for the DataStore. + CmekConfig *GoogleCloudDiscoveryengineV1CmekConfig `json:"cmekConfig,omitempty"` // ContentConfig: Immutable. The content config of the data store. If this // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // @@ -2084,6 +2148,12 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // "MEDIA" - The media industry vertical. // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. IndustryVertical string `json:"industryVertical,omitempty"` + // KmsKeyName: Input only. The KMS key to be used to protect this DataStore at + // creation time. Must be set for requests that need to comply with CMEK Org + // Policy protections. If this field is set and processed successfully, the + // DataStore will be protected by the KMS key, as indicated in the cmek_config + // field. + KmsKeyName string `json:"kmsKeyName,omitempty"` // Name: Immutable. The full resource name of the data store. Format: // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length @@ -3539,6 +3609,33 @@ func (s GoogleCloudDiscoveryengineV1TrainCustomModelResponse) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata: Metadata related to +// the progress of the CmekConfigService.UpdateCmekConfig operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1UpdateSchemaMetadata: Metadata for UpdateSchema // LRO. type GoogleCloudDiscoveryengineV1UpdateSchemaMetadata struct { @@ -3734,6 +3831,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query // ignored case. Google skips the answer if the query doesn't have clear // intent. + // "LOW_GROUNDED_ANSWER" - The low-grounded answer case. Google skips the + // answer if a well grounded answer was unable to be generated. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -5825,6 +5924,59 @@ func (s GoogleCloudDiscoveryengineV1alphaCloudSqlSource) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCmekConfig: Configurations used to enable +// CMEK data encryption with Cloud KMS keys. +type GoogleCloudDiscoveryengineV1alphaCmekConfig struct { + // IsDefault: Output only. The default CmekConfig for the Customer. + IsDefault bool `json:"isDefault,omitempty"` + // KmsKey: Kms key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId + // }`. + KmsKey string `json:"kmsKey,omitempty"` + // KmsKeyVersion: Kms key version resource name which will be used to encrypt + // resources `/cryptoKeyVersions/{keyVersion}`. + KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` + // LastRotationTimestampMicros: Output only. The timestamp of the last key + // rotation. + LastRotationTimestampMicros int64 `json:"lastRotationTimestampMicros,omitempty,string"` + // Name: Required. Name of the CmekConfig, of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the CmekConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The CmekConfig state is unknown. + // "CREATING" - The CmekConfig is creating. + // "ACTIVE" - The CmekConfig can be used with DataStores. + // "KEY_ISSUE" - The CmekConfig is unavailable, most likely due to the KMS + // Key being revoked. + // "DELETING" - The CmekConfig is deleting. + // "UNUSABLE" - The CmekConfig is not usable, most likely due to some + // internal issue. + // "ACTIVE_ROTATING" - The KMS key version is being rotated. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaCmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCmekConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse: Response message for // CompletionService.CompleteQuery method. type GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse struct { @@ -6727,6 +6879,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { AclEnabled bool `json:"aclEnabled,omitempty"` // BillingEstimation: Output only. Data size estimation for billing. BillingEstimation *GoogleCloudDiscoveryengineV1alphaDataStoreBillingEstimation `json:"billingEstimation,omitempty"` + // CmekConfig: Output only. CMEK-related information for the DataStore. + CmekConfig *GoogleCloudDiscoveryengineV1alphaCmekConfig `json:"cmekConfig,omitempty"` // ContentConfig: Immutable. The content config of the data store. If this // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // @@ -6762,6 +6916,12 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // "MEDIA" - The media industry vertical. // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. IndustryVertical string `json:"industryVertical,omitempty"` + // KmsKeyName: Input only. The KMS key to be used to protect this DataStore at + // creation time. Must be set for requests that need to comply with CMEK Org + // Policy protections. If this field is set and processed successfully, the + // DataStore will be protected by the KMS key, as indicated in the cmek_config + // field. + KmsKeyName string `json:"kmsKeyName,omitempty"` // LanguageInfo: Language info for DataStore. LanguageInfo *GoogleCloudDiscoveryengineV1alphaLanguageInfo `json:"languageInfo,omitempty"` // Name: Immutable. The full resource name of the data store. Format: @@ -9422,6 +9582,32 @@ func (s GoogleCloudDiscoveryengineV1alphaListChunksResponse) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse: Response message +// for CmekConfigService.ListCmekConfigs method. +type GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse struct { + // CmekConfigs: All the customer's CmekConfigs. + CmekConfigs []*GoogleCloudDiscoveryengineV1alphaCmekConfig `json:"cmekConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CmekConfigs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CmekConfigs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaListControlsResponse: Response for // ListControls method. type GoogleCloudDiscoveryengineV1alphaListControlsResponse struct { @@ -11657,6 +11843,9 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // relevant) in search results. This field is only considered if page_token is // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. Offset int64 `json:"offset,omitempty"` + // OneBoxPageSize: The maximum number of results to return for OneBox. This + // applies to each OneBox type individually. Default number is 10. + OneBoxPageSize int64 `json:"oneBoxPageSize,omitempty"` // OrderBy: The order in which documents are returned. Documents can be ordered // by a field in an Document object. Leave it unset if ordered by relevance. // `order_by` expression is case-sensitive. For more information on ordering @@ -14520,6 +14709,33 @@ type GoogleCloudDiscoveryengineV1alphaTuneEngineRequest struct { type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { } +// GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata: Metadata related +// to the progress of the CmekConfigService.UpdateCmekConfig operation. This +// will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for // UpdateSchema LRO. type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { @@ -14858,6 +15074,56 @@ func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaCmekConfig: Configurations used to enable +// CMEK data encryption with Cloud KMS keys. +type GoogleCloudDiscoveryengineV1betaCmekConfig struct { + // IsDefault: Output only. The default CmekConfig for the Customer. + IsDefault bool `json:"isDefault,omitempty"` + // KmsKey: Kms key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId + // }`. + KmsKey string `json:"kmsKey,omitempty"` + // KmsKeyVersion: Kms key version resource name which will be used to encrypt + // resources `/cryptoKeyVersions/{keyVersion}`. + KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` + // LastRotationTimestampMicros: Output only. The timestamp of the last key + // rotation. + LastRotationTimestampMicros int64 `json:"lastRotationTimestampMicros,omitempty,string"` + // Name: Required. Name of the CmekConfig, of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the CmekConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The CmekConfig state is unknown. + // "CREATING" - The CmekConfig is creating. + // "ACTIVE" - The CmekConfig can be used with DataStores. + // "KEY_ISSUE" - The CmekConfig is unavailable, most likely due to the KMS + // Key being revoked. + // "DELETING" - The CmekConfig is deleting. + // "UNUSABLE" - The CmekConfig is not usable, most likely due to some + // internal issue. + // "ACTIVE_ROTATING" - The KMS key version is being rotated. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaCmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCmekConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaCondition: Defines circumstances to be // checked before allowing a behavior type GoogleCloudDiscoveryengineV1betaCondition struct { @@ -15309,6 +15575,8 @@ func (s GoogleCloudDiscoveryengineV1betaCustomTuningModel) MarshalJSON() ([]byte type GoogleCloudDiscoveryengineV1betaDataStore struct { // BillingEstimation: Output only. Data size estimation for billing. BillingEstimation *GoogleCloudDiscoveryengineV1betaDataStoreBillingEstimation `json:"billingEstimation,omitempty"` + // CmekConfig: Output only. CMEK-related information for the DataStore. + CmekConfig *GoogleCloudDiscoveryengineV1betaCmekConfig `json:"cmekConfig,omitempty"` // ContentConfig: Immutable. The content config of the data store. If this // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // @@ -15342,6 +15610,12 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // "MEDIA" - The media industry vertical. // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. IndustryVertical string `json:"industryVertical,omitempty"` + // KmsKeyName: Input only. The KMS key to be used to protect this DataStore at + // creation time. Must be set for requests that need to comply with CMEK Org + // Policy protections. If this field is set and processed successfully, the + // DataStore will be protected by the KMS key, as indicated in the cmek_config + // field. + KmsKeyName string `json:"kmsKeyName,omitempty"` // LanguageInfo: Language info for DataStore. LanguageInfo *GoogleCloudDiscoveryengineV1betaLanguageInfo `json:"languageInfo,omitempty"` // Name: Immutable. The full resource name of the data store. Format: @@ -16986,6 +17260,9 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // relevant) in search results. This field is only considered if page_token is // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. Offset int64 `json:"offset,omitempty"` + // OneBoxPageSize: The maximum number of results to return for OneBox. This + // applies to each OneBox type individually. Default number is 10. + OneBoxPageSize int64 `json:"oneBoxPageSize,omitempty"` // OrderBy: The order in which documents are returned. Documents can be ordered // by a field in an Document object. Leave it unset if ordered by relevance. // `order_by` expression is case-sensitive. For more information on ordering @@ -19275,6 +19552,118 @@ func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } +type ProjectsLocationsGetCmekConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCmekConfig: Gets the CmekConfig. +// +// - name: Resource name of CmekConfig, such as +// `projects/*/locations/*/cmekConfig` or +// `projects/*/locations/*/cmekConfigs/*`. If the caller does not have +// permission to access the CmekConfig, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsService) GetCmekConfig(name string) *ProjectsLocationsGetCmekConfigCall { + c := &ProjectsLocationsGetCmekConfigCall{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 +// details. +func (c *ProjectsLocationsGetCmekConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCmekConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGetCmekConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCmekConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCmekConfigCall) Context(ctx context.Context) *ProjectsLocationsGetCmekConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGetCmekConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCmekConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.getCmekConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaCmekConfig.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 *ProjectsLocationsGetCmekConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCmekConfig, 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 := &GoogleCloudDiscoveryengineV1alphaCmekConfig{ + 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 +} + type ProjectsLocationsUpdateAclConfigCall struct { s *Service name string @@ -19381,68 +19770,73 @@ func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsUpdateCmekConfigCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphacmekconfig *GoogleCloudDiscoveryengineV1alphaCmekConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. +// UpdateCmekConfig: Provisions a CMEK key for use in a location of a +// customer's project. This method will also conduct location validation on the +// provided cmekConfig to make sure the key is valid and can be used in the +// selected location. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { - c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the CmekConfig, of the form +// `projects/{project}/locations/{location}/cmekConfig` or +// `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. +func (r *ProjectsLocationsService) UpdateCmekConfig(name string, googleclouddiscoveryenginev1alphacmekconfig *GoogleCloudDiscoveryengineV1alphaCmekConfig) *ProjectsLocationsUpdateCmekConfigCall { + c := &ProjectsLocationsUpdateCmekConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphacmekconfig = googleclouddiscoveryenginev1alphacmekconfig + return c +} + +// SetDefault sets the optional parameter "setDefault": Set the following +// CmekConfig as the default to be used for child resources if one is not +// specified. +func (c *ProjectsLocationsUpdateCmekConfigCall) SetDefault(setDefault bool) *ProjectsLocationsUpdateCmekConfigCall { + c.urlParams_.Set("setDefault", fmt.Sprint(setDefault)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsUpdateCmekConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateCmekConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsUpdateCmekConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateCmekConfigCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsUpdateCmekConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsUpdateCmekConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacmekconfig) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -19453,13 +19847,460 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.get" call. +// Do executes the "discoveryengine.projects.locations.updateCmekConfig" call. // 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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsUpdateCmekConfigCall) 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 +} + +type ProjectsLocationsCmekConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the CmekConfig. +// +// - name: Resource name of CmekConfig, such as +// `projects/*/locations/*/cmekConfig` or +// `projects/*/locations/*/cmekConfigs/*`. If the caller does not have +// permission to access the CmekConfig, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCmekConfigsService) Get(name string) *ProjectsLocationsCmekConfigsGetCall { + c := &ProjectsLocationsCmekConfigsGetCall{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 +// details. +func (c *ProjectsLocationsCmekConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCmekConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCmekConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCmekConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCmekConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCmekConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCmekConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCmekConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.cmekConfigs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaCmekConfig.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 *ProjectsLocationsCmekConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCmekConfig, 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 := &GoogleCloudDiscoveryengineV1alphaCmekConfig{ + 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 +} + +type ProjectsLocationsCmekConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the CmekConfigs with the project. +// +// - parent: The parent location resource name, such as +// `projects/{project}/locations/{location}`. If the caller does not have +// permission to list CmekConfigs under this location, regardless of whether +// or not a CmekConfig exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCmekConfigsService) List(parent string) *ProjectsLocationsCmekConfigsListCall { + c := &ProjectsLocationsCmekConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCmekConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCmekConfigsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCmekConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCmekConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCmekConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCmekConfigsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCmekConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCmekConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/cmekConfigs") + 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 "discoveryengine.projects.locations.cmekConfigs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse.ServerResponse.Head +// er 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 *ProjectsLocationsCmekConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse, 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 := &GoogleCloudDiscoveryengineV1alphaListCmekConfigsResponse{ + 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 +} + +type ProjectsLocationsCmekConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphacmekconfig *GoogleCloudDiscoveryengineV1alphaCmekConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Provisions a CMEK key for use in a location of a customer's project. +// This method will also conduct location validation on the provided cmekConfig +// to make sure the key is valid and can be used in the selected location. +// +// - name: Name of the CmekConfig, of the form +// `projects/{project}/locations/{location}/cmekConfig` or +// `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. +func (r *ProjectsLocationsCmekConfigsService) Patch(name string, googleclouddiscoveryenginev1alphacmekconfig *GoogleCloudDiscoveryengineV1alphaCmekConfig) *ProjectsLocationsCmekConfigsPatchCall { + c := &ProjectsLocationsCmekConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphacmekconfig = googleclouddiscoveryenginev1alphacmekconfig + return c +} + +// SetDefault sets the optional parameter "setDefault": Set the following +// CmekConfig as the default to be used for child resources if one is not +// specified. +func (c *ProjectsLocationsCmekConfigsPatchCall) SetDefault(setDefault bool) *ProjectsLocationsCmekConfigsPatchCall { + c.urlParams_.Set("setDefault", fmt.Sprint(setDefault)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCmekConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCmekConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCmekConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCmekConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCmekConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCmekConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacmekconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.cmekConfigs.patch" call. +// 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 *ProjectsLocationsCmekConfigsPatchCall) 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 +} + +type ProjectsLocationsCollectionsDataConnectorOperationsGetCall 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 *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{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 +// details. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.collections.dataConnector.operations.get" call. +// 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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19824,6 +20665,13 @@ func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, go return c } +// CmekConfigName sets the optional parameter "cmekConfigName": Resource name +// of the CmekConfig to use for protecting this DataStore. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CmekConfigName(cmekConfigName string) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("cmekConfigName", cmekConfigName) + return c +} + // CreateAdvancedSiteSearch sets the optional parameter // "createAdvancedSiteSearch": A boolean flag indicating whether user want to // directly create an advanced data store for site search. If the data store is @@ -19844,6 +20692,14 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStore return c } +// DisableCmek sets the optional parameter "disableCmek": DataStore without +// CMEK protections. If a default CmekConfig is set for the project, setting +// this field will override the default CmekConfig as well. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DisableCmek(disableCmek bool) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("disableCmek", fmt.Sprint(disableCmek)) + return c +} + // SkipDefaultSchemaCreation sets the optional parameter // "skipDefaultSchemaCreation": A boolean flag indicating whether to skip the // default schema creation for the data store. Only enable this flag if you are @@ -33977,6 +34833,13 @@ func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddi return c } +// CmekConfigName sets the optional parameter "cmekConfigName": Resource name +// of the CmekConfig to use for protecting this DataStore. +func (c *ProjectsLocationsDataStoresCreateCall) CmekConfigName(cmekConfigName string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("cmekConfigName", cmekConfigName) + return c +} + // CreateAdvancedSiteSearch sets the optional parameter // "createAdvancedSiteSearch": A boolean flag indicating whether user want to // directly create an advanced data store for site search. If the data store is @@ -33997,6 +34860,14 @@ func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) return c } +// DisableCmek sets the optional parameter "disableCmek": DataStore without +// CMEK protections. If a default CmekConfig is set for the project, setting +// this field will override the default CmekConfig as well. +func (c *ProjectsLocationsDataStoresCreateCall) DisableCmek(disableCmek bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("disableCmek", fmt.Sprint(disableCmek)) + return c +} + // SkipDefaultSchemaCreation sets the optional parameter // "skipDefaultSchemaCreation": A boolean flag indicating whether to skip the // default schema creation for the data store. Only enable this flag if you are diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 53e41ed08d4..7b9e3df0cbe 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -271,6 +271,11 @@ "parent" ], "parameters": { + "cmekConfigName": { + "description": "Resource name of the CmekConfig to use for protecting this DataStore.", + "location": "query", + "type": "string" + }, "createAdvancedSiteSearch": { "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", "location": "query", @@ -281,6 +286,11 @@ "location": "query", "type": "string" }, + "disableCmek": { + "description": "DataStore without CMEK protections. If a default CmekConfig is set for the project, setting this field will override the default CmekConfig as well.", + "location": "query", + "type": "boolean" + }, "parent": { "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", "location": "path", @@ -3873,6 +3883,11 @@ "parent" ], "parameters": { + "cmekConfigName": { + "description": "Resource name of the CmekConfig to use for protecting this DataStore.", + "location": "query", + "type": "string" + }, "createAdvancedSiteSearch": { "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", "location": "query", @@ -3883,6 +3898,11 @@ "location": "query", "type": "string" }, + "disableCmek": { + "description": "DataStore without CMEK protections. If a default CmekConfig is set for the project, setting this field will override the default CmekConfig as well.", + "location": "query", + "type": "boolean" + }, "parent": { "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", "location": "path", @@ -6860,7 +6880,7 @@ } } }, - "revision": "20241004", + "revision": "20241010", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -7040,6 +7060,59 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1CmekConfig": { + "description": "Configurations used to enable CMEK data encryption with Cloud KMS keys.", + "id": "GoogleCloudDiscoveryengineV1CmekConfig", + "properties": { + "isDefault": { + "description": "Output only. The default CmekConfig for the Customer.", + "readOnly": true, + "type": "boolean" + }, + "kmsKey": { + "description": "Kms key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.", + "type": "string" + }, + "kmsKeyVersion": { + "description": "Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.", + "type": "string" + }, + "lastRotationTimestampMicros": { + "description": "Output only. The timestamp of the last key rotation.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the CmekConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "KEY_ISSUE", + "DELETING", + "UNUSABLE", + "ACTIVE_ROTATING" + ], + "enumDescriptions": [ + "The CmekConfig state is unknown.", + "The CmekConfig is creating.", + "The CmekConfig can be used with DataStores.", + "The CmekConfig is unavailable, most likely due to the KMS Key being revoked.", + "The CmekConfig is deleting.", + "The CmekConfig is not usable, most likely due to some internal issue.", + "The KMS key version is being rotated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1Condition": { "description": "Defines circumstances to be checked before allowing a behavior", "id": "GoogleCloudDiscoveryengineV1Condition", @@ -7311,6 +7384,11 @@ "description": "Output only. Data size estimation for billing.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1CmekConfig", + "description": "Output only. CMEK-related information for the DataStore.", + "readOnly": true + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -7364,6 +7442,10 @@ ], "type": "string" }, + "kmsKeyName": { + "description": "Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.", + "type": "string" + }, "name": { "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" @@ -8461,6 +8543,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata": { + "description": "Metadata related to the progress of the CmekConfigService.UpdateCmekConfig operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", @@ -8569,7 +8668,8 @@ "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", "CUSTOMER_POLICY_VIOLATION", - "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2", + "LOW_GROUNDED_ANSWER" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -8580,7 +8680,8 @@ "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", - "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent.", + "The low-grounded answer case. Google skips the answer if a well grounded answer was unable to be generated." ], "type": "string" }, @@ -9066,6 +9167,59 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCmekConfig": { + "description": "Configurations used to enable CMEK data encryption with Cloud KMS keys.", + "id": "GoogleCloudDiscoveryengineV1alphaCmekConfig", + "properties": { + "isDefault": { + "description": "Output only. The default CmekConfig for the Customer.", + "readOnly": true, + "type": "boolean" + }, + "kmsKey": { + "description": "Kms key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.", + "type": "string" + }, + "kmsKeyVersion": { + "description": "Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.", + "type": "string" + }, + "lastRotationTimestampMicros": { + "description": "Output only. The timestamp of the last key rotation.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the CmekConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "KEY_ISSUE", + "DELETING", + "UNUSABLE", + "ACTIVE_ROTATING" + ], + "enumDescriptions": [ + "The CmekConfig state is unknown.", + "The CmekConfig is creating.", + "The CmekConfig can be used with DataStores.", + "The CmekConfig is unavailable, most likely due to the KMS Key being revoked.", + "The CmekConfig is deleting.", + "The CmekConfig is not usable, most likely due to some internal issue.", + "The KMS key version is being rotated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaCondition": { "description": "Defines circumstances to be checked before allowing a behavior", "id": "GoogleCloudDiscoveryengineV1alphaCondition", @@ -9425,6 +9579,11 @@ "description": "Output only. Data size estimation for billing.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig", + "description": "Output only. CMEK-related information for the DataStore.", + "readOnly": true + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -9483,6 +9642,10 @@ ], "type": "string" }, + "kmsKeyName": { + "description": "Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.", + "type": "string" + }, "languageInfo": { "$ref": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", "description": "Language info for DataStore." @@ -11269,6 +11432,11 @@ "format": "int32", "type": "integer" }, + "oneBoxPageSize": { + "description": "The maximum number of results to return for OneBox. This applies to each OneBox type individually. Default number is 10.", + "format": "int32", + "type": "integer" + }, "orderBy": { "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering the website search results, see [Order web search results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). For more information on ordering the healthcare search results, see [Order healthcare search results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" @@ -12198,6 +12366,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata": { + "description": "Metadata related to the progress of the CmekConfigService.UpdateCmekConfig operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", @@ -12337,7 +12522,8 @@ "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", "CUSTOMER_POLICY_VIOLATION", - "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2", + "LOW_GROUNDED_ANSWER" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -12348,7 +12534,8 @@ "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", - "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent.", + "The low-grounded answer case. Google skips the answer if a well grounded answer was unable to be generated." ], "type": "string" }, @@ -13765,6 +13952,59 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCmekConfig": { + "description": "Configurations used to enable CMEK data encryption with Cloud KMS keys.", + "id": "GoogleCloudDiscoveryengineV1betaCmekConfig", + "properties": { + "isDefault": { + "description": "Output only. The default CmekConfig for the Customer.", + "readOnly": true, + "type": "boolean" + }, + "kmsKey": { + "description": "Kms key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.", + "type": "string" + }, + "kmsKeyVersion": { + "description": "Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.", + "type": "string" + }, + "lastRotationTimestampMicros": { + "description": "Output only. The timestamp of the last key rotation.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the CmekConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "KEY_ISSUE", + "DELETING", + "UNUSABLE", + "ACTIVE_ROTATING" + ], + "enumDescriptions": [ + "The CmekConfig state is unknown.", + "The CmekConfig is creating.", + "The CmekConfig can be used with DataStores.", + "The CmekConfig is unavailable, most likely due to the KMS Key being revoked.", + "The CmekConfig is deleting.", + "The CmekConfig is not usable, most likely due to some internal issue.", + "The KMS key version is being rotated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCompleteQueryResponse": { "description": "Response message for CompletionService.CompleteQuery method.", "id": "GoogleCloudDiscoveryengineV1betaCompleteQueryResponse", @@ -14397,6 +14637,11 @@ "description": "Output only. Data size estimation for billing.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaCmekConfig", + "description": "Output only. CMEK-related information for the DataStore.", + "readOnly": true + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -14450,6 +14695,10 @@ ], "type": "string" }, + "kmsKeyName": { + "description": "Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.", + "type": "string" + }, "languageInfo": { "$ref": "GoogleCloudDiscoveryengineV1betaLanguageInfo", "description": "Language info for DataStore." @@ -16983,6 +17232,11 @@ "format": "int32", "type": "integer" }, + "oneBoxPageSize": { + "description": "The maximum number of results to return for OneBox. This applies to each OneBox type individually. Default number is 10.", + "format": "int32", + "type": "integer" + }, "orderBy": { "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering the website search results, see [Order web search results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). For more information on ordering the healthcare search results, see [Order healthcare search results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 720296ce850..27cc9b064a3 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -1210,6 +1210,56 @@ func (s GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1CmekConfig: Configurations used to enable CMEK +// data encryption with Cloud KMS keys. +type GoogleCloudDiscoveryengineV1CmekConfig struct { + // IsDefault: Output only. The default CmekConfig for the Customer. + IsDefault bool `json:"isDefault,omitempty"` + // KmsKey: Kms key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId + // }`. + KmsKey string `json:"kmsKey,omitempty"` + // KmsKeyVersion: Kms key version resource name which will be used to encrypt + // resources `/cryptoKeyVersions/{keyVersion}`. + KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` + // LastRotationTimestampMicros: Output only. The timestamp of the last key + // rotation. + LastRotationTimestampMicros int64 `json:"lastRotationTimestampMicros,omitempty,string"` + // Name: Required. Name of the CmekConfig, of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the CmekConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The CmekConfig state is unknown. + // "CREATING" - The CmekConfig is creating. + // "ACTIVE" - The CmekConfig can be used with DataStores. + // "KEY_ISSUE" - The CmekConfig is unavailable, most likely due to the KMS + // Key being revoked. + // "DELETING" - The CmekConfig is deleting. + // "UNUSABLE" - The CmekConfig is not usable, most likely due to some + // internal issue. + // "ACTIVE_ROTATING" - The KMS key version is being rotated. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1CmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CmekConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1Condition: Defines circumstances to be checked // before allowing a behavior type GoogleCloudDiscoveryengineV1Condition struct { @@ -1602,6 +1652,8 @@ func (s GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata) MarshalJSON() ([]b type GoogleCloudDiscoveryengineV1DataStore struct { // BillingEstimation: Output only. Data size estimation for billing. BillingEstimation *GoogleCloudDiscoveryengineV1DataStoreBillingEstimation `json:"billingEstimation,omitempty"` + // CmekConfig: Output only. CMEK-related information for the DataStore. + CmekConfig *GoogleCloudDiscoveryengineV1CmekConfig `json:"cmekConfig,omitempty"` // ContentConfig: Immutable. The content config of the data store. If this // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // @@ -1635,6 +1687,12 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // "MEDIA" - The media industry vertical. // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. IndustryVertical string `json:"industryVertical,omitempty"` + // KmsKeyName: Input only. The KMS key to be used to protect this DataStore at + // creation time. Must be set for requests that need to comply with CMEK Org + // Policy protections. If this field is set and processed successfully, the + // DataStore will be protected by the KMS key, as indicated in the cmek_config + // field. + KmsKeyName string `json:"kmsKeyName,omitempty"` // Name: Immutable. The full resource name of the data store. Format: // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length @@ -3090,6 +3148,33 @@ func (s GoogleCloudDiscoveryengineV1TrainCustomModelResponse) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata: Metadata related to +// the progress of the CmekConfigService.UpdateCmekConfig operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1UpdateSchemaMetadata: Metadata for UpdateSchema // LRO. type GoogleCloudDiscoveryengineV1UpdateSchemaMetadata struct { @@ -3239,6 +3324,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query // ignored case. Google skips the answer if the query doesn't have clear // intent. + // "LOW_GROUNDED_ANSWER" - The low-grounded answer case. Google skips the + // answer if a well grounded answer was unable to be generated. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -3857,6 +3944,56 @@ func (s GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCmekConfig: Configurations used to enable +// CMEK data encryption with Cloud KMS keys. +type GoogleCloudDiscoveryengineV1alphaCmekConfig struct { + // IsDefault: Output only. The default CmekConfig for the Customer. + IsDefault bool `json:"isDefault,omitempty"` + // KmsKey: Kms key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId + // }`. + KmsKey string `json:"kmsKey,omitempty"` + // KmsKeyVersion: Kms key version resource name which will be used to encrypt + // resources `/cryptoKeyVersions/{keyVersion}`. + KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` + // LastRotationTimestampMicros: Output only. The timestamp of the last key + // rotation. + LastRotationTimestampMicros int64 `json:"lastRotationTimestampMicros,omitempty,string"` + // Name: Required. Name of the CmekConfig, of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the CmekConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The CmekConfig state is unknown. + // "CREATING" - The CmekConfig is creating. + // "ACTIVE" - The CmekConfig can be used with DataStores. + // "KEY_ISSUE" - The CmekConfig is unavailable, most likely due to the KMS + // Key being revoked. + // "DELETING" - The CmekConfig is deleting. + // "UNUSABLE" - The CmekConfig is not usable, most likely due to some + // internal issue. + // "ACTIVE_ROTATING" - The KMS key version is being rotated. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaCmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCmekConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaCondition: Defines circumstances to be // checked before allowing a behavior type GoogleCloudDiscoveryengineV1alphaCondition struct { @@ -4340,6 +4477,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { AclEnabled bool `json:"aclEnabled,omitempty"` // BillingEstimation: Output only. Data size estimation for billing. BillingEstimation *GoogleCloudDiscoveryengineV1alphaDataStoreBillingEstimation `json:"billingEstimation,omitempty"` + // CmekConfig: Output only. CMEK-related information for the DataStore. + CmekConfig *GoogleCloudDiscoveryengineV1alphaCmekConfig `json:"cmekConfig,omitempty"` // ContentConfig: Immutable. The content config of the data store. If this // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // @@ -4375,6 +4514,12 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // "MEDIA" - The media industry vertical. // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. IndustryVertical string `json:"industryVertical,omitempty"` + // KmsKeyName: Input only. The KMS key to be used to protect this DataStore at + // creation time. Must be set for requests that need to comply with CMEK Org + // Policy protections. If this field is set and processed successfully, the + // DataStore will be protected by the KMS key, as indicated in the cmek_config + // field. + KmsKeyName string `json:"kmsKeyName,omitempty"` // LanguageInfo: Language info for DataStore. LanguageInfo *GoogleCloudDiscoveryengineV1alphaLanguageInfo `json:"languageInfo,omitempty"` // Name: Immutable. The full resource name of the data store. Format: @@ -6750,6 +6895,9 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // relevant) in search results. This field is only considered if page_token is // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. Offset int64 `json:"offset,omitempty"` + // OneBoxPageSize: The maximum number of results to return for OneBox. This + // applies to each OneBox type individually. Default number is 10. + OneBoxPageSize int64 `json:"oneBoxPageSize,omitempty"` // OrderBy: The order in which documents are returned. Documents can be ordered // by a field in an Document object. Leave it unset if ordered by relevance. // `order_by` expression is case-sensitive. For more information on ordering @@ -8214,6 +8362,33 @@ func (s GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]by type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { } +// GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata: Metadata related +// to the progress of the CmekConfigService.UpdateCmekConfig operation. This +// will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for // UpdateSchema LRO. type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { @@ -8415,6 +8590,8 @@ type GoogleCloudDiscoveryengineV1betaAnswer struct { // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query // ignored case. Google skips the answer if the query doesn't have clear // intent. + // "LOW_GROUNDED_ANSWER" - The low-grounded answer case. Google skips the + // answer if a well grounded answer was unable to be generated. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -10381,6 +10558,56 @@ func (s GoogleCloudDiscoveryengineV1betaCloudSqlSource) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaCmekConfig: Configurations used to enable +// CMEK data encryption with Cloud KMS keys. +type GoogleCloudDiscoveryengineV1betaCmekConfig struct { + // IsDefault: Output only. The default CmekConfig for the Customer. + IsDefault bool `json:"isDefault,omitempty"` + // KmsKey: Kms key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId + // }`. + KmsKey string `json:"kmsKey,omitempty"` + // KmsKeyVersion: Kms key version resource name which will be used to encrypt + // resources `/cryptoKeyVersions/{keyVersion}`. + KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` + // LastRotationTimestampMicros: Output only. The timestamp of the last key + // rotation. + LastRotationTimestampMicros int64 `json:"lastRotationTimestampMicros,omitempty,string"` + // Name: Required. Name of the CmekConfig, of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the CmekConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The CmekConfig state is unknown. + // "CREATING" - The CmekConfig is creating. + // "ACTIVE" - The CmekConfig can be used with DataStores. + // "KEY_ISSUE" - The CmekConfig is unavailable, most likely due to the KMS + // Key being revoked. + // "DELETING" - The CmekConfig is deleting. + // "UNUSABLE" - The CmekConfig is not usable, most likely due to some + // internal issue. + // "ACTIVE_ROTATING" - The KMS key version is being rotated. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaCmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCmekConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaCompleteQueryResponse: Response message for // CompletionService.CompleteQuery method. type GoogleCloudDiscoveryengineV1betaCompleteQueryResponse struct { @@ -11251,6 +11478,8 @@ func (s GoogleCloudDiscoveryengineV1betaCustomTuningModel) MarshalJSON() ([]byte type GoogleCloudDiscoveryengineV1betaDataStore struct { // BillingEstimation: Output only. Data size estimation for billing. BillingEstimation *GoogleCloudDiscoveryengineV1betaDataStoreBillingEstimation `json:"billingEstimation,omitempty"` + // CmekConfig: Output only. CMEK-related information for the DataStore. + CmekConfig *GoogleCloudDiscoveryengineV1betaCmekConfig `json:"cmekConfig,omitempty"` // ContentConfig: Immutable. The content config of the data store. If this // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // @@ -11284,6 +11513,12 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // "MEDIA" - The media industry vertical. // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. IndustryVertical string `json:"industryVertical,omitempty"` + // KmsKeyName: Input only. The KMS key to be used to protect this DataStore at + // creation time. Must be set for requests that need to comply with CMEK Org + // Policy protections. If this field is set and processed successfully, the + // DataStore will be protected by the KMS key, as indicated in the cmek_config + // field. + KmsKeyName string `json:"kmsKeyName,omitempty"` // LanguageInfo: Language info for DataStore. LanguageInfo *GoogleCloudDiscoveryengineV1betaLanguageInfo `json:"languageInfo,omitempty"` // Name: Immutable. The full resource name of the data store. Format: @@ -14979,6 +15214,9 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // relevant) in search results. This field is only considered if page_token is // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. Offset int64 `json:"offset,omitempty"` + // OneBoxPageSize: The maximum number of results to return for OneBox. This + // applies to each OneBox type individually. Default number is 10. + OneBoxPageSize int64 `json:"oneBoxPageSize,omitempty"` // OrderBy: The order in which documents are returned. Documents can be ordered // by a field in an Document object. Leave it unset if ordered by relevance. // `order_by` expression is case-sensitive. For more information on ordering @@ -18766,6 +19004,13 @@ func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, go return c } +// CmekConfigName sets the optional parameter "cmekConfigName": Resource name +// of the CmekConfig to use for protecting this DataStore. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CmekConfigName(cmekConfigName string) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("cmekConfigName", cmekConfigName) + return c +} + // CreateAdvancedSiteSearch sets the optional parameter // "createAdvancedSiteSearch": A boolean flag indicating whether user want to // directly create an advanced data store for site search. If the data store is @@ -18786,6 +19031,14 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStore return c } +// DisableCmek sets the optional parameter "disableCmek": DataStore without +// CMEK protections. If a default CmekConfig is set for the project, setting +// this field will override the default CmekConfig as well. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DisableCmek(disableCmek bool) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("disableCmek", fmt.Sprint(disableCmek)) + return c +} + // SkipDefaultSchemaCreation sets the optional parameter // "skipDefaultSchemaCreation": A boolean flag indicating whether to skip the // default schema creation for the data store. Only enable this flag if you are @@ -32063,6 +32316,13 @@ func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddi return c } +// CmekConfigName sets the optional parameter "cmekConfigName": Resource name +// of the CmekConfig to use for protecting this DataStore. +func (c *ProjectsLocationsDataStoresCreateCall) CmekConfigName(cmekConfigName string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("cmekConfigName", cmekConfigName) + return c +} + // CreateAdvancedSiteSearch sets the optional parameter // "createAdvancedSiteSearch": A boolean flag indicating whether user want to // directly create an advanced data store for site search. If the data store is @@ -32083,6 +32343,14 @@ func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) return c } +// DisableCmek sets the optional parameter "disableCmek": DataStore without +// CMEK protections. If a default CmekConfig is set for the project, setting +// this field will override the default CmekConfig as well. +func (c *ProjectsLocationsDataStoresCreateCall) DisableCmek(disableCmek bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("disableCmek", fmt.Sprint(disableCmek)) + return c +} + // SkipDefaultSchemaCreation sets the optional parameter // "skipDefaultSchemaCreation": A boolean flag indicating whether to skip the // default schema creation for the data store. Only enable this flag if you are diff --git a/netapp/v1/netapp-api.json b/netapp/v1/netapp-api.json new file mode 100644 index 00000000000..bd0bf4c0412 --- /dev/null +++ b/netapp/v1/netapp-api.json @@ -0,0 +1,4340 @@ +{ + "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://netapp.googleapis.com/", + "batchPath": "batch", + "canonicalName": "NetApp Files", + "description": "Google Cloud NetApp Volumes is a fully-managed, cloud-based data storage service that provides advanced data management capabilities and highly scalable performance with global availability.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/netapp/", + "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": "netapp:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://netapp.mtls.googleapis.com/", + "name": "netapp", + "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": "netapp.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": "netapp.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": { + "activeDirectories": { + "methods": { + "create": { + "description": "CreateActiveDirectory Creates the active directory specified in the request.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/activeDirectories", + "httpMethod": "POST", + "id": "netapp.projects.locations.activeDirectories.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "activeDirectoryId": { + "description": "Required. ID of the active directory to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter , the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/activeDirectories", + "request": { + "$ref": "ActiveDirectory" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete the active directory specified in the request.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/activeDirectories/{activeDirectoriesId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.activeDirectories.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the active directory.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/activeDirectories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Describes a specified active directory.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/activeDirectories/{activeDirectoriesId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.activeDirectories.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the active directory.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/activeDirectories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ActiveDirectory" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists active directories.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/activeDirectories", + "httpMethod": "GET", + "id": "netapp.projects.locations.activeDirectories.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, the 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 ListActiveDirectoriesRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/activeDirectories", + "response": { + "$ref": "ListActiveDirectoriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update the parameters of an active directories.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/activeDirectories/{activeDirectoriesId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.activeDirectories.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/activeDirectories/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Active Directory 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": "ActiveDirectory" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "backupPolicies": { + "methods": { + "create": { + "description": "Creates new backup policy", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupPolicies", + "httpMethod": "POST", + "id": "netapp.projects.locations.backupPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupPolicyId": { + "description": "Required. The ID to use for the backup policy. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location to create the backup policies of, in the format `projects/{project_id}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backupPolicies", + "request": { + "$ref": "BackupPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the backup policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupPolicies/{backupPoliciesId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.backupPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backup policy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified backup policy by backup_policy_id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupPolicies/{backupPoliciesId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backupPolicy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "BackupPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns list of all available backup policies.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupPolicies", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupPolicies.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, the 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 ListBackupPoliciesRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backupPolicies", + "response": { + "$ref": "ListBackupPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates settings of a specific backup policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupPolicies/{backupPoliciesId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.backupPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the backup policy. Format: `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Backup Policy 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": "BackupPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "backupVaults": { + "methods": { + "create": { + "description": "Creates new backup vault", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults", + "httpMethod": "POST", + "id": "netapp.projects.locations.backupVaults.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupVaultId": { + "description": "Required. The ID to use for the backupVault. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location to create the backup vaults, in the format `projects/{project_id}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backupVaults", + "request": { + "$ref": "BackupVault" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the backup vault.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.backupVaults.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified backup vault", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupVaults.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "BackupVault" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns list of all available backup vaults.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupVaults.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location for which to retrieve backupVault information, in the format `projects/{project_id}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backupVaults", + "response": { + "$ref": "ListBackupVaultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the settings of a specific backup vault.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.backupVaults.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the backup vault. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Backup resource to be updated. 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": "BackupVault" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups", + "httpMethod": "POST", + "id": "netapp.projects.locations.backupVaults.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. The ID to use for the backup. The ID must be unique within the specified backupVault. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The NetApp backupVault to create the backups of, in the format `projects/*/locations/*/backupVaults/{backup_vault_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backups", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.backupVaults.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified backup", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupVaults.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all backups for a backupVault.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupVaults.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The standard list filter. If specified, backups will be returned based on the attribute name that matches the filter expression. If empty, then no backups are filtered out. See https://google.aip.dev/160", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The backupVault for which to retrieve backup information, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. To retrieve backup information for all locations, use \"-\" for the `{location}` value. To retrieve backup information for all backupVaults, use \"-\" for the `{backup_vault_id}` value. To retrieve backup information for a volume, use \"-\" for the `{backup_vault_id}` value and specify volume full name with the filter.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backups", + "response": { + "$ref": "ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update backup with full spec.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups/{backupsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.backupVaults.backups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the backup. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Backup resource to be updated. 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": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "kmsConfigs": { + "methods": { + "create": { + "description": "Creates a new KMS config.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/kmsConfigs", + "httpMethod": "POST", + "id": "netapp.projects.locations.kmsConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "kmsConfigId": { + "description": "Required. Id of the requesting KmsConfig. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/kmsConfigs", + "request": { + "$ref": "KmsConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the Kms config.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.kmsConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the KmsConfig.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "encrypt": { + "description": "Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}:encrypt", + "httpMethod": "POST", + "id": "netapp.projects.locations.kmsConfigs.encrypt", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the KmsConfig.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:encrypt", + "request": { + "$ref": "EncryptVolumesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified KMS config by kms_config_id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.kmsConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the KmsConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "KmsConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all KMS configs owned by the caller.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/kmsConfigs", + "httpMethod": "GET", + "id": "netapp.projects.locations.kmsConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/kmsConfigs", + "response": { + "$ref": "ListKmsConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the Kms config properties with the full spec", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.kmsConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the KmsConfig.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the KmsConfig 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": "KmsConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "verify": { + "description": "Verifies KMS config reachability.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}:verify", + "httpMethod": "POST", + "id": "netapp.projects.locations.kmsConfigs.verify", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the KMS Config to be verified.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:verify", + "request": { + "$ref": "VerifyKmsConfigRequest" + }, + "response": { + "$ref": "VerifyKmsConfigResponse" + }, + "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": "netapp.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": "GoogleProtobufEmpty" + }, + "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": "netapp.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": "GoogleProtobufEmpty" + }, + "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": "netapp.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": "netapp.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" + ] + } + } + }, + "storagePools": { + "methods": { + "create": { + "description": "Creates a new storage pool.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/storagePools", + "httpMethod": "POST", + "id": "netapp.projects.locations.storagePools.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "storagePoolId": { + "description": "Required. Id of the requesting storage pool. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/storagePools", + "request": { + "$ref": "StoragePool" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the storage pool.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.storagePools.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified storage pool by poolId.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.storagePools.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "StoragePool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all storage pools owned by the caller.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/storagePools", + "httpMethod": "GET", + "id": "netapp.projects.locations.storagePools.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/storagePools", + "response": { + "$ref": "ListStoragePoolsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the storage pool properties with the full spec", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.storagePools.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the StoragePool 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": "StoragePool" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "switch": { + "description": "This operation will switch the active/replica zone for a regional storagePool.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}:switch", + "httpMethod": "POST", + "id": "netapp.projects.locations.storagePools.switch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:switch", + "request": { + "$ref": "SwitchActiveReplicaZoneRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "volumes": { + "methods": { + "create": { + "description": "Creates a new Volume in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "volumeId": { + "description": "Required. Id of the requesting volume. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/volumes", + "request": { + "$ref": "Volume" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Volume.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.volumes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "If this field is set as true, CCFE will not block the volume resource deletion even if it has any snapshots resource. (Otherwise, the request will only work if the volume has no snapshots.)", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the volume", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Volume.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the volume", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Volume" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Volumes in a given project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.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, the 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 ListVolumesRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/volumes", + "response": { + "$ref": "ListVolumesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Volume.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.volumes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the volume", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Volume 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": "Volume" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "revert": { + "description": "Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}:revert", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.revert", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the volume, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:revert", + "request": { + "$ref": "RevertVolumeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "replications": { + "methods": { + "create": { + "description": "Create a new replication for a volume.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.replications.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The NetApp volume to create the replications of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + }, + "replicationId": { + "description": "Required. ID of the replication to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/replications", + "request": { + "$ref": "Replication" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a replication.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.volumes.replications.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The replication resource name, in the format `projects/*/locations/*/volumes/*/replications/{replication_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Describe a replication for a volume.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.replications.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The replication resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Replication" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all replications for a volume.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.replications.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The volume for which to retrieve replication information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/replications", + "response": { + "$ref": "ListReplicationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the settings of a specific replication.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.volumes.replications.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the Replication. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one path must be supplied in this field.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Replication" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resume": { + "description": "Resume Cross Region Replication.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}:resume", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.replications.resume", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:resume", + "request": { + "$ref": "ResumeReplicationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "reverseDirection": { + "description": "Reverses direction of replication. Source becomes destination and destination becomes source.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}:reverseDirection", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.replications.reverseDirection", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:reverseDirection", + "request": { + "$ref": "ReverseReplicationDirectionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "stop": { + "description": "Stop Cross Region Replication.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}:stop", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.replications.stop", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:stop", + "request": { + "$ref": "StopReplicationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "snapshots": { + "methods": { + "create": { + "description": "Create a new snapshot for a volume.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.snapshots.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The NetApp volume to create the snapshots of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + }, + "snapshotId": { + "description": "Required. ID of the snapshot to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/snapshots", + "request": { + "$ref": "Snapshot" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a snapshot.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots/{snapshotsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.volumes.snapshots.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The snapshot resource name, in the format `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Describe a snapshot for a volume.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots/{snapshotsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.snapshots.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The snapshot resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Snapshot" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all snapshots for a volume.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.snapshots.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The volume for which to retrieve snapshot information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/snapshots", + "response": { + "$ref": "ListSnapshotsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the settings of a specific snapshot.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots/{snapshotsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.volumes.snapshots.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the snapshot. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one path must be supplied in this field.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Snapshot" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20241002", + "rootUrl": "https://netapp.googleapis.com/", + "schemas": { + "ActiveDirectory": { + "description": "ActiveDirectory is the public representation of the active directory config.", + "id": "ActiveDirectory", + "properties": { + "administrators": { + "description": "Optional. Users to be added to the Built-in Admininstrators group.", + "items": { + "type": "string" + }, + "type": "array" + }, + "aesEncryption": { + "description": "If enabled, AES encryption will be enabled for SMB communication.", + "type": "boolean" + }, + "backupOperators": { + "description": "Optional. Users to be added to the Built-in Backup Operator active directory group.", + "items": { + "type": "string" + }, + "type": "array" + }, + "createTime": { + "description": "Output only. Create time of the active directory.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Description of the active directory.", + "type": "string" + }, + "dns": { + "description": "Required. Comma separated list of DNS server IP addresses for the Active Directory domain.", + "type": "string" + }, + "domain": { + "description": "Required. Name of the Active Directory domain", + "type": "string" + }, + "encryptDcConnections": { + "description": "If enabled, traffic between the SMB server to Domain Controller (DC) will be encrypted.", + "type": "boolean" + }, + "kdcHostname": { + "description": "Name of the active directory machine. This optional parameter is used only while creating kerberos volume", + "type": "string" + }, + "kdcIp": { + "description": "KDC server IP address for the active directory machine.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels for the active directory.", + "type": "object" + }, + "ldapSigning": { + "description": "Specifies whether or not the LDAP traffic needs to be signed.", + "type": "boolean" + }, + "name": { + "description": "Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.", + "type": "string" + }, + "netBiosPrefix": { + "description": "Required. NetBIOSPrefix is used as a prefix for SMB server name.", + "type": "string" + }, + "nfsUsersWithLdap": { + "description": "If enabled, will allow access to local users and LDAP users. If access is needed for only LDAP users, it has to be disabled.", + "type": "boolean" + }, + "organizationalUnit": { + "description": "The Organizational Unit (OU) within the Windows Active Directory the user belongs to.", + "type": "string" + }, + "password": { + "description": "Required. Password of the Active Directory domain administrator.", + "type": "string" + }, + "securityOperators": { + "description": "Optional. Domain users to be given the SeSecurityPrivilege.", + "items": { + "type": "string" + }, + "type": "array" + }, + "site": { + "description": "The Active Directory site the service will limit Domain Controller discovery too.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the AD.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "UPDATING", + "IN_USE", + "DELETING", + "ERROR", + "DIAGNOSING" + ], + "enumDescriptions": [ + "Unspecified Active Directory State", + "Active Directory State is Creating", + "Active Directory State is Ready", + "Active Directory State is Updating", + "Active Directory State is In use", + "Active Directory State is Deleting", + "Active Directory State is Error", + "Active Directory State is Diagnosing." + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. The state details of the Active Directory.", + "readOnly": true, + "type": "string" + }, + "username": { + "description": "Required. Username of the Active Directory domain administrator.", + "type": "string" + } + }, + "type": "object" + }, + "AssetLocation": { + "description": "Provides the mapping of a cloud asset to a direct physical location or to a proxy that defines the location on its behalf.", + "id": "AssetLocation", + "properties": { + "ccfeRmsPath": { + "description": "Spanner path of the CCFE RMS database. It is only applicable for CCFE tenants that use CCFE RMS for storing resource metadata.", + "type": "string" + }, + "expected": { + "$ref": "IsolationExpectations", + "description": "Defines the customer expectation around ZI/ZS for this asset and ZI/ZS state of the region at the time of asset creation." + }, + "extraParameters": { + "description": "Defines extra parameters required for specific asset types.", + "items": { + "$ref": "ExtraParameter" + }, + "type": "array" + }, + "locationData": { + "description": "Contains all kinds of physical location definitions for this asset.", + "items": { + "$ref": "LocationData" + }, + "type": "array" + }, + "parentAsset": { + "description": "Defines parents assets if any in order to allow later generation of child_asset_location data via child assets.", + "items": { + "$ref": "CloudAsset" + }, + "type": "array" + } + }, + "type": "object" + }, + "Backup": { + "description": "A NetApp Backup.", + "id": "Backup", + "properties": { + "backupType": { + "description": "Output only. Type of backup, manually created or created by a backup policy.", + "enum": [ + "TYPE_UNSPECIFIED", + "MANUAL", + "SCHEDULED" + ], + "enumDescriptions": [ + "Unspecified backup type.", + "Manual backup type.", + "Scheduled backup type." + ], + "readOnly": true, + "type": "string" + }, + "chainStorageBytes": { + "description": "Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size)", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the backup was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the backup. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.", + "type": "string" + }, + "sourceSnapshot": { + "description": "If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`", + "type": "string" + }, + "sourceVolume": { + "description": "Volume full name of this backup belongs to. Format: `projects/{projects_id}/locations/{location}/volumes/{volume_id}`", + "type": "string" + }, + "state": { + "description": "Output only. The backup state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "UPLOADING", + "READY", + "DELETING", + "ERROR", + "UPDATING" + ], + "enumDescriptions": [ + "State not set.", + "Backup is being created. While in this state, the snapshot for the backup point-in-time may not have been created yet, and so the point-in-time may not have been fixed.", + "Backup is being uploaded. While in this state, none of the writes to the volume will be included in the backup.", + "Backup is available for use.", + "Backup is being deleted.", + "Backup is not valid and cannot be used for creating new volumes or restoring existing volumes.", + "Backup is being updated." + ], + "readOnly": true, + "type": "string" + }, + "volumeUsageBytes": { + "description": "Output only. Size of the file system when the backup was created. When creating a new volume from the backup, the volume capacity will have to be at least as big.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BackupConfig": { + "description": "BackupConfig contains backup related config on a volume.", + "id": "BackupConfig", + "properties": { + "backupChainBytes": { + "description": "Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size).", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "backupPolicies": { + "description": "Optional. When specified, schedule backups will be created based on the policy configuration.", + "items": { + "type": "string" + }, + "type": "array" + }, + "backupVault": { + "description": "Optional. Name of backup vault. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}", + "type": "string" + }, + "scheduledBackupEnabled": { + "description": "Optional. When set to true, scheduled backup is enabled on the volume. This field should be nil when there's no backup policy attached.", + "type": "boolean" + } + }, + "type": "object" + }, + "BackupPolicy": { + "description": "Backup Policy.", + "id": "BackupPolicy", + "properties": { + "assignedVolumeCount": { + "description": "Output only. The total number of volumes assigned by this backup policy.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "createTime": { + "description": "Output only. The time when the backup policy was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dailyBackupLimit": { + "description": "Number of daily backups to keep. Note that the minimum daily backup limit is 2.", + "format": "int32", + "type": "integer" + }, + "description": { + "description": "Description of the backup policy.", + "type": "string" + }, + "enabled": { + "description": "If enabled, make backups automatically according to the schedules. This will be applied to all volumes that have this policy attached and enforced on volume level. If not specified, default is true.", + "type": "boolean" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "monthlyBackupLimit": { + "description": "Number of monthly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Identifier. The resource name of the backup policy. Format: `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.", + "type": "string" + }, + "state": { + "description": "Output only. The backup policy state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING", + "ERROR", + "UPDATING" + ], + "enumDescriptions": [ + "State not set.", + "BackupPolicy is being created.", + "BackupPolicy is available for use.", + "BackupPolicy is being deleted.", + "BackupPolicy is not valid and cannot be used.", + "BackupPolicy is being updated." + ], + "readOnly": true, + "type": "string" + }, + "weeklyBackupLimit": { + "description": "Number of weekly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "BackupVault": { + "description": "A NetApp BackupVault.", + "id": "BackupVault", + "properties": { + "createTime": { + "description": "Output only. Create time of the backup vault.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Description of the backup vault.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the backup vault. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.", + "type": "string" + }, + "state": { + "description": "Output only. The backup vault state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING", + "ERROR", + "UPDATING" + ], + "enumDescriptions": [ + "State not set.", + "BackupVault is being created.", + "BackupVault is available for use.", + "BackupVault is being deleted.", + "BackupVault is not valid and cannot be used.", + "BackupVault is being updated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BlobstoreLocation": { + "description": "Policy ID that identified data placement in Blobstore as per go/blobstore-user-guide#data-metadata-placement-and-failure-domains", + "id": "BlobstoreLocation", + "properties": { + "policyId": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "CloudAsset": { + "id": "CloudAsset", + "properties": { + "assetName": { + "type": "string" + }, + "assetType": { + "type": "string" + } + }, + "type": "object" + }, + "CloudAssetComposition": { + "id": "CloudAssetComposition", + "properties": { + "childAsset": { + "items": { + "$ref": "CloudAsset" + }, + "type": "array" + } + }, + "type": "object" + }, + "DailySchedule": { + "description": "Make a snapshot every day e.g. at 04:00, 05:20, 23:50", + "id": "DailySchedule", + "properties": { + "hour": { + "description": "Set the hour to start the snapshot (0-23), defaults to midnight (0).", + "format": "double", + "type": "number" + }, + "minute": { + "description": "Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).", + "format": "double", + "type": "number" + }, + "snapshotsToKeep": { + "description": "The maximum number of Snapshots to keep for the hourly schedule", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "DestinationVolumeParameters": { + "description": "DestinationVolumeParameters specify input parameters used for creating destination volume.", + "id": "DestinationVolumeParameters", + "properties": { + "description": { + "description": "Description for the destination volume.", + "type": "string" + }, + "shareName": { + "description": "Destination volume's share name. If not specified, source volume's share name will be used.", + "type": "string" + }, + "storagePool": { + "description": "Required. Existing destination StoragePool name.", + "type": "string" + }, + "volumeId": { + "description": "Desired destination volume resource id. If not specified, source volume's resource id will be used. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.", + "type": "string" + } + }, + "type": "object" + }, + "DirectLocationAssignment": { + "id": "DirectLocationAssignment", + "properties": { + "location": { + "items": { + "$ref": "LocationAssignment" + }, + "type": "array" + } + }, + "type": "object" + }, + "EncryptVolumesRequest": { + "description": "EncryptVolumesRequest specifies the KMS config to encrypt existing volumes.", + "id": "EncryptVolumesRequest", + "properties": {}, + "type": "object" + }, + "ExportPolicy": { + "description": "Defines the export policy for the volume.", + "id": "ExportPolicy", + "properties": { + "rules": { + "description": "Required. List of export policy rules", + "items": { + "$ref": "SimpleExportPolicyRule" + }, + "type": "array" + } + }, + "type": "object" + }, + "ExtraParameter": { + "description": "Defines parameters that should only be used for specific asset types.", + "id": "ExtraParameter", + "properties": { + "regionalMigDistributionPolicy": { + "$ref": "RegionalMigDistributionPolicy", + "description": "Details about zones used by regional compute.googleapis.com/InstanceGroupManager to create instances." + } + }, + "type": "object" + }, + "GoogleProtobufEmpty": { + "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": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "HourlySchedule": { + "description": "Make a snapshot every hour e.g. at 04:00, 05:00, 06:00.", + "id": "HourlySchedule", + "properties": { + "minute": { + "description": "Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).", + "format": "double", + "type": "number" + }, + "snapshotsToKeep": { + "description": "The maximum number of Snapshots to keep for the hourly schedule", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "IsolationExpectations": { + "id": "IsolationExpectations", + "properties": { + "requirementOverride": { + "$ref": "RequirementOverride", + "description": "Explicit overrides for ZI and ZS requirements to be used for resources that should be excluded from ZI/ZS verification logic." + }, + "ziOrgPolicy": { + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "ziRegionPolicy": { + "enum": [ + "ZI_REGION_POLICY_UNSPECIFIED", + "ZI_REGION_POLICY_UNKNOWN", + "ZI_REGION_POLICY_NOT_SET", + "ZI_REGION_POLICY_FAIL_OPEN", + "ZI_REGION_POLICY_FAIL_CLOSED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "ziRegionState": { + "enum": [ + "ZI_REGION_UNSPECIFIED", + "ZI_REGION_UNKNOWN", + "ZI_REGION_NOT_ENABLED", + "ZI_REGION_ENABLED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zoneIsolation": { + "deprecated": true, + "description": "Deprecated: use zi_org_policy, zi_region_policy and zi_region_state instead for setting ZI expectations as per go/zicy-publish-physical-location.", + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "zoneSeparation": { + "deprecated": true, + "description": "Deprecated: use zs_org_policy, and zs_region_stateinstead for setting Zs expectations as per go/zicy-publish-physical-location.", + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zsOrgPolicy": { + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zsRegionState": { + "enum": [ + "ZS_REGION_UNSPECIFIED", + "ZS_REGION_UNKNOWN", + "ZS_REGION_NOT_ENABLED", + "ZS_REGION_ENABLED" + ], + "enumDescriptions": [ + "", + "To be used if tracking of the asset ZS-bit is not available", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "KmsConfig": { + "description": "KmsConfig is the customer managed encryption key(CMEK) configuration.", + "id": "KmsConfig", + "properties": { + "createTime": { + "description": "Output only. Create time of the KmsConfig.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "cryptoKeyName": { + "description": "Required. Customer managed crypto key resource full name. Format: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}.", + "type": "string" + }, + "description": { + "description": "Description of the KmsConfig.", + "type": "string" + }, + "instructions": { + "description": "Output only. Instructions to provide the access to the customer provided encryption key.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "name": { + "description": "Identifier. Name of the KmsConfig.", + "type": "string" + }, + "serviceAccount": { + "description": "Output only. The Service account which will have access to the customer provided encryption key.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the KmsConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "DELETING", + "UPDATING", + "IN_USE", + "ERROR", + "KEY_CHECK_PENDING", + "KEY_NOT_REACHABLE", + "DISABLING", + "DISABLED", + "MIGRATING" + ], + "enumDescriptions": [ + "Unspecified KmsConfig State", + "KmsConfig State is Ready", + "KmsConfig State is Creating", + "KmsConfig State is Deleting", + "KmsConfig State is Updating", + "KmsConfig State is In Use.", + "KmsConfig State is Error", + "KmsConfig State is Pending to verify crypto key access.", + "KmsConfig State is Not accessbile by the SDE service account to the crypto key.", + "KmsConfig State is Disabling.", + "KmsConfig State is Disabled.", + "KmsConfig State is Migrating. The existing volumes are migrating from SMEK to CMEK." + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the KmsConfig.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ListActiveDirectoriesResponse": { + "description": "ListActiveDirectoriesResponse contains all the active directories requested.", + "id": "ListActiveDirectoriesResponse", + "properties": { + "activeDirectories": { + "description": "The list of active directories.", + "items": { + "$ref": "ActiveDirectory" + }, + "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" + }, + "ListBackupPoliciesResponse": { + "description": "ListBackupPoliciesResponse contains all the backup policies requested.", + "id": "ListBackupPoliciesResponse", + "properties": { + "backupPolicies": { + "description": "The list of backup policies.", + "items": { + "$ref": "BackupPolicy" + }, + "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" + }, + "ListBackupVaultsResponse": { + "description": "ListBackupVaultsResponse is the result of ListBackupVaultsRequest.", + "id": "ListBackupVaultsResponse", + "properties": { + "backupVaults": { + "description": "A list of backupVaults in the project for the specified location.", + "items": { + "$ref": "BackupVault" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token you can use to retrieve the next page of results. Not returned if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListBackupsResponse": { + "description": "ListBackupsResponse is the result of ListBackupsRequest.", + "id": "ListBackupsResponse", + "properties": { + "backups": { + "description": "A list of backups in the project.", + "items": { + "$ref": "Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token you can use to retrieve the next page of results. Not returned if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListKmsConfigsResponse": { + "description": "ListKmsConfigsResponse is the response to a ListKmsConfigsRequest.", + "id": "ListKmsConfigsResponse", + "properties": { + "kmsConfigs": { + "description": "The list of KmsConfigs", + "items": { + "$ref": "KmsConfig" + }, + "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" + }, + "ListReplicationsResponse": { + "description": "ListReplicationsResponse is the result of ListReplicationsRequest.", + "id": "ListReplicationsResponse", + "properties": { + "nextPageToken": { + "description": "The token you can use to retrieve the next page of results. Not returned if there are no more results in the list.", + "type": "string" + }, + "replications": { + "description": "A list of replications in the project for the specified volume.", + "items": { + "$ref": "Replication" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSnapshotsResponse": { + "description": "ListSnapshotsResponse is the result of ListSnapshotsRequest.", + "id": "ListSnapshotsResponse", + "properties": { + "nextPageToken": { + "description": "The token you can use to retrieve the next page of results. Not returned if there are no more results in the list.", + "type": "string" + }, + "snapshots": { + "description": "A list of snapshots in the project for the specified volume.", + "items": { + "$ref": "Snapshot" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListStoragePoolsResponse": { + "description": "ListStoragePoolsResponse is the response to a ListStoragePoolsRequest.", + "id": "ListStoragePoolsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "storagePools": { + "description": "The list of StoragePools", + "items": { + "$ref": "StoragePool" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListVolumesResponse": { + "description": "Message for response to listing Volumes", + "id": "ListVolumesResponse", + "properties": { + "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" + }, + "volumes": { + "description": "The list of Volume", + "items": { + "$ref": "Volume" + }, + "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" + }, + "LocationAssignment": { + "id": "LocationAssignment", + "properties": { + "location": { + "type": "string" + }, + "locationType": { + "enum": [ + "UNSPECIFIED", + "CLUSTER", + "POP", + "CLOUD_ZONE", + "CLOUD_REGION", + "MULTI_REGION_GEO", + "MULTI_REGION_JURISDICTION", + "GLOBAL", + "OTHER" + ], + "enumDescriptions": [ + "", + "1-10: Physical failure domains.", + "", + "11-20: Logical failure domains.", + "", + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "LocationData": { + "id": "LocationData", + "properties": { + "blobstoreLocation": { + "$ref": "BlobstoreLocation" + }, + "childAssetLocation": { + "$ref": "CloudAssetComposition" + }, + "directLocation": { + "$ref": "DirectLocationAssignment" + }, + "gcpProjectProxy": { + "$ref": "TenantProjectProxy" + }, + "placerLocation": { + "$ref": "PlacerLocation" + }, + "spannerLocation": { + "$ref": "SpannerLocation" + } + }, + "type": "object" + }, + "LocationMetadata": { + "description": "Metadata for a given google.cloud.location.Location.", + "id": "LocationMetadata", + "properties": { + "supportedServiceLevels": { + "description": "Output only. Supported service levels in a location.", + "items": { + "enum": [ + "SERVICE_LEVEL_UNSPECIFIED", + "PREMIUM", + "EXTREME", + "STANDARD", + "FLEX" + ], + "enumDescriptions": [ + "Unspecified service level.", + "Premium service level.", + "Extreme service level.", + "Standard service level.", + "Flex service level." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "MonthlySchedule": { + "description": "Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50", + "id": "MonthlySchedule", + "properties": { + "daysOfMonth": { + "description": "Set the day or days of the month to make a snapshot (1-31). Accepts a comma separated number of days. Defaults to '1'.", + "type": "string" + }, + "hour": { + "description": "Set the hour to start the snapshot (0-23), defaults to midnight (0).", + "format": "double", + "type": "number" + }, + "minute": { + "description": "Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).", + "format": "double", + "type": "number" + }, + "snapshotsToKeep": { + "description": "The maximum number of Snapshots to keep for the hourly schedule", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "MountOption": { + "description": "View only mount options for a volume.", + "id": "MountOption", + "properties": { + "export": { + "description": "Export string", + "type": "string" + }, + "exportFull": { + "description": "Full export string", + "type": "string" + }, + "instructions": { + "description": "Instructions for mounting", + "type": "string" + }, + "protocol": { + "description": "Protocol to mount with.", + "enum": [ + "PROTOCOLS_UNSPECIFIED", + "NFSV3", + "NFSV4", + "SMB" + ], + "enumDescriptions": [ + "Unspecified protocol", + "NFS V3 protocol", + "NFS V4 protocol", + "SMB protocol" + ], + "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 been canceled successfully 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" + }, + "PlacerLocation": { + "description": "Message describing that the location of the customer resource is tied to placer allocations", + "id": "PlacerLocation", + "properties": { + "placerConfig": { + "description": "Directory with a config related to it in placer (e.g. \"/placer/prod/home/my-root/my-dir\")", + "type": "string" + } + }, + "type": "object" + }, + "RegionalMigDistributionPolicy": { + "description": "To be used for specifying the intended distribution of regional compute.googleapis.com/InstanceGroupManager instances", + "id": "RegionalMigDistributionPolicy", + "properties": { + "targetShape": { + "description": "The shape in which the group converges around distribution of resources. Instance of proto2 enum", + "format": "int32", + "type": "integer" + }, + "zones": { + "description": "Cloud zones used by regional MIG to create instances.", + "items": { + "$ref": "ZoneConfiguration" + }, + "type": "array" + } + }, + "type": "object" + }, + "Replication": { + "description": "Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.", + "id": "Replication", + "properties": { + "createTime": { + "description": "Output only. Replication create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description about this replication relationship.", + "type": "string" + }, + "destinationVolume": { + "description": "Output only. Full name of destination volume resource. Example : \"projects/{project}/locations/{location}/volumes/{volume_id}\"", + "readOnly": true, + "type": "string" + }, + "destinationVolumeParameters": { + "$ref": "DestinationVolumeParameters", + "description": "Required. Input only. Destination volume parameters" + }, + "healthy": { + "description": "Output only. Condition of the relationship. Can be one of the following: - true: The replication relationship is healthy. It has not missed the most recent scheduled transfer. - false: The replication relationship is not healthy. It has missed the most recent scheduled transfer.", + "readOnly": true, + "type": "boolean" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "mirrorState": { + "description": "Output only. Indicates the state of mirroring.", + "enum": [ + "MIRROR_STATE_UNSPECIFIED", + "PREPARING", + "MIRRORED", + "STOPPED", + "TRANSFERRING" + ], + "enumDescriptions": [ + "Unspecified MirrorState", + "Destination volume is being prepared.", + "Destination volume has been initialized and is ready to receive replication transfers.", + "Destination volume is not receiving replication transfers.", + "Incremental replication is in progress." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of the Replication. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.", + "type": "string" + }, + "replicationSchedule": { + "description": "Required. Indicates the schedule for replication.", + "enum": [ + "REPLICATION_SCHEDULE_UNSPECIFIED", + "EVERY_10_MINUTES", + "HOURLY", + "DAILY" + ], + "enumDescriptions": [ + "Unspecified ReplicationSchedule", + "Replication happens once every 10 minutes.", + "Replication happens once every hour.", + "Replication happens once every day." + ], + "type": "string" + }, + "role": { + "description": "Output only. Indicates whether this points to source or destination.", + "enum": [ + "REPLICATION_ROLE_UNSPECIFIED", + "SOURCE", + "DESTINATION" + ], + "enumDescriptions": [ + "Unspecified replication role", + "Indicates Source volume.", + "Indicates Destination volume." + ], + "readOnly": true, + "type": "string" + }, + "sourceVolume": { + "description": "Output only. Full name of source volume resource. Example : \"projects/{project}/locations/{location}/volumes/{volume_id}\"", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the replication.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "UPDATING", + "DELETING", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified replication State", + "Replication is creating.", + "Replication is ready.", + "Replication is updating.", + "Replication is deleting.", + "Replication is in error state." + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the replication.", + "readOnly": true, + "type": "string" + }, + "transferStats": { + "$ref": "TransferStats", + "description": "Output only. Replication transfer statistics.", + "readOnly": true + } + }, + "type": "object" + }, + "RequirementOverride": { + "id": "RequirementOverride", + "properties": { + "ziOverride": { + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "zsOverride": { + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "RestoreParameters": { + "description": "The RestoreParameters if volume is created from a snapshot or backup.", + "id": "RestoreParameters", + "properties": { + "sourceBackup": { + "description": "Full name of the backup resource. Format: projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}", + "type": "string" + }, + "sourceSnapshot": { + "description": "Full name of the snapshot resource. Format: projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}", + "type": "string" + } + }, + "type": "object" + }, + "ResumeReplicationRequest": { + "description": "ResumeReplicationRequest resumes a stopped replication.", + "id": "ResumeReplicationRequest", + "properties": {}, + "type": "object" + }, + "ReverseReplicationDirectionRequest": { + "description": "ReverseReplicationDirectionRequest reverses direction of replication. Source becomes destination and destination becomes source.", + "id": "ReverseReplicationDirectionRequest", + "properties": {}, + "type": "object" + }, + "RevertVolumeRequest": { + "description": "RevertVolumeRequest reverts the given volume to the specified snapshot.", + "id": "RevertVolumeRequest", + "properties": { + "snapshotId": { + "description": "Required. The snapshot resource ID, in the format 'my-snapshot', where the specified ID is the {snapshot_id} of the fully qualified name like projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id}", + "type": "string" + } + }, + "type": "object" + }, + "SimpleExportPolicyRule": { + "description": "An export policy rule describing various export options.", + "id": "SimpleExportPolicyRule", + "properties": { + "accessType": { + "description": "Access type (ReadWrite, ReadOnly, None)", + "enum": [ + "ACCESS_TYPE_UNSPECIFIED", + "READ_ONLY", + "READ_WRITE", + "READ_NONE" + ], + "enumDescriptions": [ + "Unspecified Access Type", + "Read Only", + "Read Write", + "None" + ], + "type": "string" + }, + "allowedClients": { + "description": "Comma separated list of allowed clients IP addresses", + "type": "string" + }, + "hasRootAccess": { + "description": "Whether Unix root access will be granted.", + "type": "string" + }, + "kerberos5ReadOnly": { + "description": "If enabled (true) the rule defines a read only access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'authentication' kerberos security mode.", + "type": "boolean" + }, + "kerberos5ReadWrite": { + "description": "If enabled (true) the rule defines read and write access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'authentication' kerberos security mode. The 'kerberos5ReadOnly' value be ignored if this is enabled.", + "type": "boolean" + }, + "kerberos5iReadOnly": { + "description": "If enabled (true) the rule defines a read only access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'integrity' kerberos security mode.", + "type": "boolean" + }, + "kerberos5iReadWrite": { + "description": "If enabled (true) the rule defines read and write access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' value be ignored if this is enabled.", + "type": "boolean" + }, + "kerberos5pReadOnly": { + "description": "If enabled (true) the rule defines a read only access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'privacy' kerberos security mode.", + "type": "boolean" + }, + "kerberos5pReadWrite": { + "description": "If enabled (true) the rule defines read and write access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' value be ignored if this is enabled.", + "type": "boolean" + }, + "nfsv3": { + "description": "NFS V3 protocol.", + "type": "boolean" + }, + "nfsv4": { + "description": "NFS V4 protocol.", + "type": "boolean" + } + }, + "type": "object" + }, + "Snapshot": { + "description": "Snapshot is a point-in-time version of a Volume's content.", + "id": "Snapshot", + "properties": { + "createTime": { + "description": "Output only. The time when the snapshot was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the snapshot. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.", + "type": "string" + }, + "state": { + "description": "Output only. The snapshot state.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "DELETING", + "UPDATING", + "DISABLED", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified Snapshot State", + "Snapshot State is Ready", + "Snapshot State is Creating", + "Snapshot State is Deleting", + "Snapshot State is Updating", + "Snapshot State is Disabled", + "Snapshot State is Error" + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the storage pool", + "readOnly": true, + "type": "string" + }, + "usedBytes": { + "description": "Output only. Current storage usage for the snapshot in bytes.", + "format": "double", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "SnapshotPolicy": { + "description": "Snapshot Policy for a volume.", + "id": "SnapshotPolicy", + "properties": { + "dailySchedule": { + "$ref": "DailySchedule", + "description": "Daily schedule policy." + }, + "enabled": { + "description": "If enabled, make snapshots automatically according to the schedules. Default is false.", + "type": "boolean" + }, + "hourlySchedule": { + "$ref": "HourlySchedule", + "description": "Hourly schedule policy." + }, + "monthlySchedule": { + "$ref": "MonthlySchedule", + "description": "Monthly schedule policy." + }, + "weeklySchedule": { + "$ref": "WeeklySchedule", + "description": "Weekly schedule policy." + } + }, + "type": "object" + }, + "SpannerLocation": { + "id": "SpannerLocation", + "properties": { + "backupName": { + "description": "Set of backups used by the resource with name in the same format as what is available at http://table/spanner_automon.backup_metadata", + "items": { + "type": "string" + }, + "type": "array" + }, + "dbName": { + "description": "Set of databases used by the resource in format /span//", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "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" + }, + "StopReplicationRequest": { + "description": "StopReplicationRequest stops a replication until resumed.", + "id": "StopReplicationRequest", + "properties": { + "force": { + "description": "Indicates whether to stop replication forcefully while data transfer is in progress. Warning! if force is true, this will abort any current transfers and can lead to data loss due to partial transfer. If force is false, stop replication will fail while data transfer is in progress and you will need to retry later.", + "type": "boolean" + } + }, + "type": "object" + }, + "StoragePool": { + "description": "StoragePool is a container for volumes with a service level and capacity. Volumes can be created in a pool of sufficient available capacity. StoragePool capacity is what you are billed for.", + "id": "StoragePool", + "properties": { + "activeDirectory": { + "description": "Optional. Specifies the Active Directory to be used for creating a SMB volume.", + "type": "string" + }, + "allowAutoTiering": { + "description": "Optional. True if the storage pool supports Auto Tiering enabled volumes. Default is false. Auto-tiering can be enabled after storage pool creation but it can't be disabled once enabled.", + "type": "boolean" + }, + "capacityGib": { + "description": "Required. Capacity in GIB of the pool", + "format": "int64", + "type": "string" + }, + "createTime": { + "description": "Output only. Create time of the storage pool", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the storage pool", + "type": "string" + }, + "encryptionType": { + "description": "Output only. Specifies the current pool encryption key source.", + "enum": [ + "ENCRYPTION_TYPE_UNSPECIFIED", + "SERVICE_MANAGED", + "CLOUD_KMS" + ], + "enumDescriptions": [ + "The source of the encryption key is not specified.", + "Google managed encryption key.", + "Customer managed encryption key, which is stored in KMS." + ], + "readOnly": true, + "type": "string" + }, + "globalAccessAllowed": { + "deprecated": true, + "description": "Deprecated. Used to allow SO pool to access AD or DNS server from other regions.", + "type": "boolean" + }, + "kmsConfig": { + "description": "Optional. Specifies the KMS config to be used for volume encryption.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs", + "type": "object" + }, + "ldapEnabled": { + "description": "Optional. Flag indicating if the pool is NFS LDAP enabled or not.", + "type": "boolean" + }, + "name": { + "description": "Identifier. Name of the storage pool", + "type": "string" + }, + "network": { + "description": "Required. VPC Network name. Format: projects/{project}/global/networks/{network}", + "type": "string" + }, + "psaRange": { + "description": "Optional. This field is not implemented. The values provided in this field are ignored.", + "type": "string" + }, + "replicaZone": { + "description": "Optional. Specifies the replica zone for regional storagePool.", + "type": "string" + }, + "serviceLevel": { + "description": "Required. Service level of the storage pool", + "enum": [ + "SERVICE_LEVEL_UNSPECIFIED", + "PREMIUM", + "EXTREME", + "STANDARD", + "FLEX" + ], + "enumDescriptions": [ + "Unspecified service level.", + "Premium service level.", + "Extreme service level.", + "Standard service level.", + "Flex service level." + ], + "type": "string" + }, + "state": { + "description": "Output only. State of the storage pool", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "DELETING", + "UPDATING", + "RESTORING", + "DISABLED", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified Storage Pool State", + "Storage Pool State is Ready", + "Storage Pool State is Creating", + "Storage Pool State is Deleting", + "Storage Pool State is Updating", + "Storage Pool State is Restoring", + "Storage Pool State is Disabled", + "Storage Pool State is Error" + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the storage pool", + "readOnly": true, + "type": "string" + }, + "volumeCapacityGib": { + "description": "Output only. Allocated size of all volumes in GIB in the storage pool", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "volumeCount": { + "description": "Output only. Volume count of the storage pool", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "zone": { + "description": "Optional. Specifies the active zone for regional storagePool.", + "type": "string" + } + }, + "type": "object" + }, + "SwitchActiveReplicaZoneRequest": { + "description": "SwitchActiveReplicaZoneRequest switch the active/replica zone for a regional storagePool.", + "id": "SwitchActiveReplicaZoneRequest", + "properties": {}, + "type": "object" + }, + "TenantProjectProxy": { + "id": "TenantProjectProxy", + "properties": { + "projectNumbers": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TieringPolicy": { + "description": "Defines tiering policy for the volume.", + "id": "TieringPolicy", + "properties": { + "coolingThresholdDays": { + "description": "Optional. Time in days to mark the volume's data block as cold and make it eligible for tiering, can be range from 7-183. Default is 31.", + "format": "int32", + "type": "integer" + }, + "tierAction": { + "description": "Optional. Flag indicating if the volume has tiering policy enable/pause. Default is PAUSED.", + "enum": [ + "TIER_ACTION_UNSPECIFIED", + "ENABLED", + "PAUSED" + ], + "enumDescriptions": [ + "Unspecified.", + "When tiering is enabled, new cold data will be tiered.", + "When paused, tiering won't be performed on new data. Existing data stays tiered until accessed." + ], + "type": "string" + } + }, + "type": "object" + }, + "TransferStats": { + "description": "TransferStats reports all statistics related to replication transfer.", + "id": "TransferStats", + "properties": { + "lagDuration": { + "description": "Lag duration indicates the duration by which Destination region volume content lags behind the primary region volume content.", + "format": "google-duration", + "type": "string" + }, + "lastTransferBytes": { + "description": "Last transfer size in bytes.", + "format": "int64", + "type": "string" + }, + "lastTransferDuration": { + "description": "Time taken during last transfer.", + "format": "google-duration", + "type": "string" + }, + "lastTransferEndTime": { + "description": "Time when last transfer completed.", + "format": "google-datetime", + "type": "string" + }, + "lastTransferError": { + "description": "A message describing the cause of the last transfer failure.", + "type": "string" + }, + "totalTransferDuration": { + "description": "Cumulative time taken across all transfers for the replication relationship.", + "format": "google-duration", + "type": "string" + }, + "transferBytes": { + "description": "Cumulative bytes trasferred so far for the replication relatinonship.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "Time when progress was updated last.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "VerifyKmsConfigRequest": { + "description": "VerifyKmsConfigRequest specifies the KMS config to be validated.", + "id": "VerifyKmsConfigRequest", + "properties": {}, + "type": "object" + }, + "VerifyKmsConfigResponse": { + "description": "VerifyKmsConfigResponse contains the information if the config is correctly and error message.", + "id": "VerifyKmsConfigResponse", + "properties": { + "healthError": { + "description": "Output only. Error message if config is not healthy.", + "readOnly": true, + "type": "string" + }, + "healthy": { + "description": "Output only. If the customer key configured correctly to the encrypt volume.", + "readOnly": true, + "type": "boolean" + }, + "instructions": { + "description": "Output only. Instructions for the customers to provide the access to the encryption key.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Volume": { + "description": "Volume provides a filesystem that you can mount.", + "id": "Volume", + "properties": { + "activeDirectory": { + "description": "Output only. Specifies the ActiveDirectory name of a SMB volume.", + "readOnly": true, + "type": "string" + }, + "backupConfig": { + "$ref": "BackupConfig", + "description": "BackupConfig of the volume." + }, + "capacityGib": { + "description": "Required. Capacity in GIB of the volume", + "format": "int64", + "type": "string" + }, + "coldTierSizeGib": { + "description": "Output only. Size of the volume cold tier data in GiB.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Create time of the volume", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the volume", + "type": "string" + }, + "encryptionType": { + "description": "Output only. Specified the current volume encryption key source.", + "enum": [ + "ENCRYPTION_TYPE_UNSPECIFIED", + "SERVICE_MANAGED", + "CLOUD_KMS" + ], + "enumDescriptions": [ + "The source of the encryption key is not specified.", + "Google managed encryption key.", + "Customer managed encryption key, which is stored in KMS." + ], + "readOnly": true, + "type": "string" + }, + "exportPolicy": { + "$ref": "ExportPolicy", + "description": "Optional. Export policy of the volume" + }, + "hasReplication": { + "description": "Output only. Indicates whether the volume is part of a replication relationship.", + "readOnly": true, + "type": "boolean" + }, + "kerberosEnabled": { + "description": "Optional. Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).", + "type": "boolean" + }, + "kmsConfig": { + "description": "Output only. Specifies the KMS config to be used for volume encryption.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs", + "type": "object" + }, + "largeCapacity": { + "description": "Optional. Flag indicating if the volume will be a large capacity volume or a regular volume.", + "type": "boolean" + }, + "ldapEnabled": { + "description": "Output only. Flag indicating if the volume is NFS LDAP enabled or not.", + "readOnly": true, + "type": "boolean" + }, + "mountOptions": { + "description": "Output only. Mount options of this volume", + "items": { + "$ref": "MountOption" + }, + "readOnly": true, + "type": "array" + }, + "multipleEndpoints": { + "description": "Optional. Flag indicating if the volume will have an IP address per node for volumes supporting multiple IP endpoints. Only the volume with large_capacity will be allowed to have multiple endpoints.", + "type": "boolean" + }, + "name": { + "description": "Identifier. Name of the volume", + "type": "string" + }, + "network": { + "description": "Output only. VPC Network name. Format: projects/{project}/global/networks/{network}", + "readOnly": true, + "type": "string" + }, + "protocols": { + "description": "Required. Protocols required for the volume", + "items": { + "enum": [ + "PROTOCOLS_UNSPECIFIED", + "NFSV3", + "NFSV4", + "SMB" + ], + "enumDescriptions": [ + "Unspecified protocol", + "NFS V3 protocol", + "NFS V4 protocol", + "SMB protocol" + ], + "type": "string" + }, + "type": "array" + }, + "psaRange": { + "description": "Output only. This field is not implemented. The values provided in this field are ignored.", + "readOnly": true, + "type": "string" + }, + "replicaZone": { + "description": "Output only. Specifies the replica zone for regional volume.", + "readOnly": true, + "type": "string" + }, + "restoreParameters": { + "$ref": "RestoreParameters", + "description": "Optional. Specifies the source of the volume to be created from." + }, + "restrictedActions": { + "description": "Optional. List of actions that are restricted on this volume.", + "items": { + "enum": [ + "RESTRICTED_ACTION_UNSPECIFIED", + "DELETE" + ], + "enumDescriptions": [ + "Unspecified restricted action", + "Prevent volume from being deleted when mounted." + ], + "type": "string" + }, + "type": "array" + }, + "securityStyle": { + "description": "Optional. Security Style of the Volume", + "enum": [ + "SECURITY_STYLE_UNSPECIFIED", + "NTFS", + "UNIX" + ], + "enumDescriptions": [ + "SecurityStyle is unspecified", + "SecurityStyle uses NTFS", + "SecurityStyle uses UNIX" + ], + "type": "string" + }, + "serviceLevel": { + "description": "Output only. Service level of the volume", + "enum": [ + "SERVICE_LEVEL_UNSPECIFIED", + "PREMIUM", + "EXTREME", + "STANDARD", + "FLEX" + ], + "enumDescriptions": [ + "Unspecified service level.", + "Premium service level.", + "Extreme service level.", + "Standard service level.", + "Flex service level." + ], + "readOnly": true, + "type": "string" + }, + "shareName": { + "description": "Required. Share name of the volume", + "type": "string" + }, + "smbSettings": { + "description": "Optional. SMB share settings for the volume.", + "items": { + "enum": [ + "SMB_SETTINGS_UNSPECIFIED", + "ENCRYPT_DATA", + "BROWSABLE", + "CHANGE_NOTIFY", + "NON_BROWSABLE", + "OPLOCKS", + "SHOW_SNAPSHOT", + "SHOW_PREVIOUS_VERSIONS", + "ACCESS_BASED_ENUMERATION", + "CONTINUOUSLY_AVAILABLE" + ], + "enumDescriptions": [ + "Unspecified default option", + "SMB setting encrypt data", + "SMB setting browsable", + "SMB setting notify change", + "SMB setting not to notify change", + "SMB setting oplocks", + "SMB setting to show snapshots", + "SMB setting to show previous versions", + "SMB setting to access volume based on enumerartion", + "Continuously available enumeration" + ], + "type": "string" + }, + "type": "array" + }, + "snapReserve": { + "description": "Optional. Snap_reserve specifies percentage of volume storage reserved for snapshot storage. Default is 0 percent.", + "format": "double", + "type": "number" + }, + "snapshotDirectory": { + "description": "Optional. Snapshot_directory if enabled (true) the volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots.", + "type": "boolean" + }, + "snapshotPolicy": { + "$ref": "SnapshotPolicy", + "description": "Optional. SnapshotPolicy for a volume." + }, + "state": { + "description": "Output only. State of the volume", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "DELETING", + "UPDATING", + "RESTORING", + "DISABLED", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified Volume State", + "Volume State is Ready", + "Volume State is Creating", + "Volume State is Deleting", + "Volume State is Updating", + "Volume State is Restoring", + "Volume State is Disabled", + "Volume State is Error" + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the volume", + "readOnly": true, + "type": "string" + }, + "storagePool": { + "description": "Required. StoragePool name of the volume", + "type": "string" + }, + "tieringPolicy": { + "$ref": "TieringPolicy", + "description": "Tiering policy for the volume." + }, + "unixPermissions": { + "description": "Optional. Default unix style permission (e.g. 777) the mount point will be created with. Applicable for NFS protocol types only.", + "type": "string" + }, + "usedGib": { + "description": "Output only. Used capacity in GIB of the volume. This is computed periodically and it does not represent the realtime usage.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "zone": { + "description": "Output only. Specifies the active zone for regional volume.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "WeeklySchedule": { + "description": "Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday 23:50", + "id": "WeeklySchedule", + "properties": { + "day": { + "description": "Set the day or days of the week to make a snapshot. Accepts a comma separated days of the week. Defaults to 'Sunday'.", + "type": "string" + }, + "hour": { + "description": "Set the hour to start the snapshot (0-23), defaults to midnight (0).", + "format": "double", + "type": "number" + }, + "minute": { + "description": "Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).", + "format": "double", + "type": "number" + }, + "snapshotsToKeep": { + "description": "The maximum number of Snapshots to keep for the hourly schedule", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "ZoneConfiguration": { + "id": "ZoneConfiguration", + "properties": { + "zone": { + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "NetApp API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/netapp/v1/netapp-gen.go b/netapp/v1/netapp-gen.go new file mode 100644 index 00000000000..e155129f9e7 --- /dev/null +++ b/netapp/v1/netapp-gen.go @@ -0,0 +1,9357 @@ +// Copyright 2024 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 netapp provides access to the NetApp API. +// +// For product documentation, see: https://cloud.google.com/netapp/ +// +// # 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/netapp/v1" +// ... +// ctx := context.Background() +// netappService, err := netapp.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]: +// +// netappService, err := netapp.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, ...) +// netappService, err := netapp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package netapp // import "google.golang.org/api/netapp/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 = "netapp:v1" +const apiName = "netapp" +const apiVersion = "v1" +const basePath = "https://netapp.googleapis.com/" +const basePathTemplate = "https://netapp.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://netapp.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.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + 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.ActiveDirectories = NewProjectsLocationsActiveDirectoriesService(s) + rs.BackupPolicies = NewProjectsLocationsBackupPoliciesService(s) + rs.BackupVaults = NewProjectsLocationsBackupVaultsService(s) + rs.KmsConfigs = NewProjectsLocationsKmsConfigsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.StoragePools = NewProjectsLocationsStoragePoolsService(s) + rs.Volumes = NewProjectsLocationsVolumesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + ActiveDirectories *ProjectsLocationsActiveDirectoriesService + + BackupPolicies *ProjectsLocationsBackupPoliciesService + + BackupVaults *ProjectsLocationsBackupVaultsService + + KmsConfigs *ProjectsLocationsKmsConfigsService + + Operations *ProjectsLocationsOperationsService + + StoragePools *ProjectsLocationsStoragePoolsService + + Volumes *ProjectsLocationsVolumesService +} + +func NewProjectsLocationsActiveDirectoriesService(s *Service) *ProjectsLocationsActiveDirectoriesService { + rs := &ProjectsLocationsActiveDirectoriesService{s: s} + return rs +} + +type ProjectsLocationsActiveDirectoriesService struct { + s *Service +} + +func NewProjectsLocationsBackupPoliciesService(s *Service) *ProjectsLocationsBackupPoliciesService { + rs := &ProjectsLocationsBackupPoliciesService{s: s} + return rs +} + +type ProjectsLocationsBackupPoliciesService struct { + s *Service +} + +func NewProjectsLocationsBackupVaultsService(s *Service) *ProjectsLocationsBackupVaultsService { + rs := &ProjectsLocationsBackupVaultsService{s: s} + rs.Backups = NewProjectsLocationsBackupVaultsBackupsService(s) + return rs +} + +type ProjectsLocationsBackupVaultsService struct { + s *Service + + Backups *ProjectsLocationsBackupVaultsBackupsService +} + +func NewProjectsLocationsBackupVaultsBackupsService(s *Service) *ProjectsLocationsBackupVaultsBackupsService { + rs := &ProjectsLocationsBackupVaultsBackupsService{s: s} + return rs +} + +type ProjectsLocationsBackupVaultsBackupsService struct { + s *Service +} + +func NewProjectsLocationsKmsConfigsService(s *Service) *ProjectsLocationsKmsConfigsService { + rs := &ProjectsLocationsKmsConfigsService{s: s} + return rs +} + +type ProjectsLocationsKmsConfigsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsStoragePoolsService(s *Service) *ProjectsLocationsStoragePoolsService { + rs := &ProjectsLocationsStoragePoolsService{s: s} + return rs +} + +type ProjectsLocationsStoragePoolsService struct { + s *Service +} + +func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesService { + rs := &ProjectsLocationsVolumesService{s: s} + rs.Replications = NewProjectsLocationsVolumesReplicationsService(s) + rs.Snapshots = NewProjectsLocationsVolumesSnapshotsService(s) + return rs +} + +type ProjectsLocationsVolumesService struct { + s *Service + + Replications *ProjectsLocationsVolumesReplicationsService + + Snapshots *ProjectsLocationsVolumesSnapshotsService +} + +func NewProjectsLocationsVolumesReplicationsService(s *Service) *ProjectsLocationsVolumesReplicationsService { + rs := &ProjectsLocationsVolumesReplicationsService{s: s} + return rs +} + +type ProjectsLocationsVolumesReplicationsService struct { + s *Service +} + +func NewProjectsLocationsVolumesSnapshotsService(s *Service) *ProjectsLocationsVolumesSnapshotsService { + rs := &ProjectsLocationsVolumesSnapshotsService{s: s} + return rs +} + +type ProjectsLocationsVolumesSnapshotsService struct { + s *Service +} + +// ActiveDirectory: ActiveDirectory is the public representation of the active +// directory config. +type ActiveDirectory struct { + // Administrators: Optional. Users to be added to the Built-in Admininstrators + // group. + Administrators []string `json:"administrators,omitempty"` + // AesEncryption: If enabled, AES encryption will be enabled for SMB + // communication. + AesEncryption bool `json:"aesEncryption,omitempty"` + // BackupOperators: Optional. Users to be added to the Built-in Backup Operator + // active directory group. + BackupOperators []string `json:"backupOperators,omitempty"` + // CreateTime: Output only. Create time of the active directory. + CreateTime string `json:"createTime,omitempty"` + // Description: Description of the active directory. + Description string `json:"description,omitempty"` + // Dns: Required. Comma separated list of DNS server IP addresses for the + // Active Directory domain. + Dns string `json:"dns,omitempty"` + // Domain: Required. Name of the Active Directory domain + Domain string `json:"domain,omitempty"` + // EncryptDcConnections: If enabled, traffic between the SMB server to Domain + // Controller (DC) will be encrypted. + EncryptDcConnections bool `json:"encryptDcConnections,omitempty"` + // KdcHostname: Name of the active directory machine. This optional parameter + // is used only while creating kerberos volume + KdcHostname string `json:"kdcHostname,omitempty"` + // KdcIp: KDC server IP address for the active directory machine. + KdcIp string `json:"kdcIp,omitempty"` + // Labels: Labels for the active directory. + Labels map[string]string `json:"labels,omitempty"` + // LdapSigning: Specifies whether or not the LDAP traffic needs to be signed. + LdapSigning bool `json:"ldapSigning,omitempty"` + // Name: Identifier. The resource name of the active directory. Format: + // `projects/{project_number}/locations/{location_id}/activeDirectories/{active_ + // directory_id}`. + Name string `json:"name,omitempty"` + // NetBiosPrefix: Required. NetBIOSPrefix is used as a prefix for SMB server + // name. + NetBiosPrefix string `json:"netBiosPrefix,omitempty"` + // NfsUsersWithLdap: If enabled, will allow access to local users and LDAP + // users. If access is needed for only LDAP users, it has to be disabled. + NfsUsersWithLdap bool `json:"nfsUsersWithLdap,omitempty"` + // OrganizationalUnit: The Organizational Unit (OU) within the Windows Active + // Directory the user belongs to. + OrganizationalUnit string `json:"organizationalUnit,omitempty"` + // Password: Required. Password of the Active Directory domain administrator. + Password string `json:"password,omitempty"` + // SecurityOperators: Optional. Domain users to be given the + // SeSecurityPrivilege. + SecurityOperators []string `json:"securityOperators,omitempty"` + // Site: The Active Directory site the service will limit Domain Controller + // discovery too. + Site string `json:"site,omitempty"` + // State: Output only. The state of the AD. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified Active Directory State + // "CREATING" - Active Directory State is Creating + // "READY" - Active Directory State is Ready + // "UPDATING" - Active Directory State is Updating + // "IN_USE" - Active Directory State is In use + // "DELETING" - Active Directory State is Deleting + // "ERROR" - Active Directory State is Error + // "DIAGNOSING" - Active Directory State is Diagnosing. + State string `json:"state,omitempty"` + // StateDetails: Output only. The state details of the Active Directory. + StateDetails string `json:"stateDetails,omitempty"` + // Username: Required. Username of the Active Directory domain administrator. + Username string `json:"username,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Administrators") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Administrators") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ActiveDirectory) MarshalJSON() ([]byte, error) { + type NoMethod ActiveDirectory + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AssetLocation: Provides the mapping of a cloud asset to a direct physical +// location or to a proxy that defines the location on its behalf. +type AssetLocation struct { + // CcfeRmsPath: Spanner path of the CCFE RMS database. It is only applicable + // for CCFE tenants that use CCFE RMS for storing resource metadata. + CcfeRmsPath string `json:"ccfeRmsPath,omitempty"` + // Expected: Defines the customer expectation around ZI/ZS for this asset and + // ZI/ZS state of the region at the time of asset creation. + Expected *IsolationExpectations `json:"expected,omitempty"` + // ExtraParameters: Defines extra parameters required for specific asset types. + ExtraParameters []*ExtraParameter `json:"extraParameters,omitempty"` + // LocationData: Contains all kinds of physical location definitions for this + // asset. + LocationData []*LocationData `json:"locationData,omitempty"` + // ParentAsset: Defines parents assets if any in order to allow later + // generation of child_asset_location data via child assets. + ParentAsset []*CloudAsset `json:"parentAsset,omitempty"` + // ForceSendFields is a list of field names (e.g. "CcfeRmsPath") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CcfeRmsPath") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AssetLocation) MarshalJSON() ([]byte, error) { + type NoMethod AssetLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Backup: A NetApp Backup. +type Backup struct { + // BackupType: Output only. Type of backup, manually created or created by a + // backup policy. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified backup type. + // "MANUAL" - Manual backup type. + // "SCHEDULED" - Scheduled backup type. + BackupType string `json:"backupType,omitempty"` + // ChainStorageBytes: Output only. Total size of all backups in a chain in + // bytes = baseline backup size + sum(incremental backup size) + ChainStorageBytes int64 `json:"chainStorageBytes,omitempty,string"` + // CreateTime: Output only. The time when the backup was created. + CreateTime string `json:"createTime,omitempty"` + // Description: A description of the backup with 2048 characters or less. + // Requests with longer descriptions will be rejected. + Description string `json:"description,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the backup. Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/ba + // ckups/{backup_id}`. + Name string `json:"name,omitempty"` + // SourceSnapshot: If specified, backup will be created from the given + // snapshot. If not specified, there will be a new snapshot taken to initiate + // the backup creation. Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{sn + // apshot_id}` + SourceSnapshot string `json:"sourceSnapshot,omitempty"` + // SourceVolume: Volume full name of this backup belongs to. Format: + // `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + SourceVolume string `json:"sourceVolume,omitempty"` + // State: Output only. The backup state. + // + // Possible values: + // "STATE_UNSPECIFIED" - State not set. + // "CREATING" - Backup is being created. While in this state, the snapshot + // for the backup point-in-time may not have been created yet, and so the + // point-in-time may not have been fixed. + // "UPLOADING" - Backup is being uploaded. While in this state, none of the + // writes to the volume will be included in the backup. + // "READY" - Backup is available for use. + // "DELETING" - Backup is being deleted. + // "ERROR" - Backup is not valid and cannot be used for creating new volumes + // or restoring existing volumes. + // "UPDATING" - Backup is being updated. + State string `json:"state,omitempty"` + // VolumeUsageBytes: Output only. Size of the file system when the backup was + // created. When creating a new volume from the backup, the volume capacity + // will have to be at least as big. + VolumeUsageBytes int64 `json:"volumeUsageBytes,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BackupType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Backup) MarshalJSON() ([]byte, error) { + type NoMethod Backup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupConfig: BackupConfig contains backup related config on a volume. +type BackupConfig struct { + // BackupChainBytes: Output only. Total size of all backups in a chain in bytes + // = baseline backup size + sum(incremental backup size). + BackupChainBytes int64 `json:"backupChainBytes,omitempty,string"` + // BackupPolicies: Optional. When specified, schedule backups will be created + // based on the policy configuration. + BackupPolicies []string `json:"backupPolicies,omitempty"` + // BackupVault: Optional. Name of backup vault. Format: + // projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + BackupVault string `json:"backupVault,omitempty"` + // ScheduledBackupEnabled: Optional. When set to true, scheduled backup is + // enabled on the volume. This field should be nil when there's no backup + // policy attached. + ScheduledBackupEnabled bool `json:"scheduledBackupEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupChainBytes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupChainBytes") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupConfig) MarshalJSON() ([]byte, error) { + type NoMethod BackupConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupPolicy: Backup Policy. +type BackupPolicy struct { + // AssignedVolumeCount: Output only. The total number of volumes assigned by + // this backup policy. + AssignedVolumeCount int64 `json:"assignedVolumeCount,omitempty"` + // CreateTime: Output only. The time when the backup policy was created. + CreateTime string `json:"createTime,omitempty"` + // DailyBackupLimit: Number of daily backups to keep. Note that the minimum + // daily backup limit is 2. + DailyBackupLimit int64 `json:"dailyBackupLimit,omitempty"` + // Description: Description of the backup policy. + Description string `json:"description,omitempty"` + // Enabled: If enabled, make backups automatically according to the schedules. + // This will be applied to all volumes that have this policy attached and + // enforced on volume level. If not specified, default is true. + Enabled bool `json:"enabled,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // MonthlyBackupLimit: Number of monthly backups to keep. Note that the sum of + // daily, weekly and monthly backups should be greater than 1. + MonthlyBackupLimit int64 `json:"monthlyBackupLimit,omitempty"` + // Name: Identifier. The resource name of the backup policy. Format: + // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id} + // `. + Name string `json:"name,omitempty"` + // State: Output only. The backup policy state. + // + // Possible values: + // "STATE_UNSPECIFIED" - State not set. + // "CREATING" - BackupPolicy is being created. + // "READY" - BackupPolicy is available for use. + // "DELETING" - BackupPolicy is being deleted. + // "ERROR" - BackupPolicy is not valid and cannot be used. + // "UPDATING" - BackupPolicy is being updated. + State string `json:"state,omitempty"` + // WeeklyBackupLimit: Number of weekly backups to keep. Note that the sum of + // daily, weekly and monthly backups should be greater than 1. + WeeklyBackupLimit int64 `json:"weeklyBackupLimit,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AssignedVolumeCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssignedVolumeCount") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupPolicy) MarshalJSON() ([]byte, error) { + type NoMethod BackupPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupVault: A NetApp BackupVault. +type BackupVault struct { + // CreateTime: Output only. Create time of the backup vault. + CreateTime string `json:"createTime,omitempty"` + // Description: Description of the backup vault. + Description string `json:"description,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the backup vault. Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + Name string `json:"name,omitempty"` + // State: Output only. The backup vault state. + // + // Possible values: + // "STATE_UNSPECIFIED" - State not set. + // "CREATING" - BackupVault is being created. + // "READY" - BackupVault is available for use. + // "DELETING" - BackupVault is being deleted. + // "ERROR" - BackupVault is not valid and cannot be used. + // "UPDATING" - BackupVault is being updated. + State string `json:"state,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupVault) MarshalJSON() ([]byte, error) { + type NoMethod BackupVault + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BlobstoreLocation: Policy ID that identified data placement in Blobstore as +// per go/blobstore-user-guide#data-metadata-placement-and-failure-domains +type BlobstoreLocation struct { + PolicyId []string `json:"policyId,omitempty"` + // ForceSendFields is a list of field names (e.g. "PolicyId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PolicyId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BlobstoreLocation) MarshalJSON() ([]byte, error) { + type NoMethod BlobstoreLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + +type CloudAsset struct { + AssetName string `json:"assetName,omitempty"` + AssetType string `json:"assetType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssetName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssetName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudAsset) MarshalJSON() ([]byte, error) { + type NoMethod CloudAsset + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudAssetComposition struct { + ChildAsset []*CloudAsset `json:"childAsset,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChildAsset") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChildAsset") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudAssetComposition) MarshalJSON() ([]byte, error) { + type NoMethod CloudAssetComposition + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DailySchedule: Make a snapshot every day e.g. at 04:00, 05:20, 23:50 +type DailySchedule struct { + // Hour: Set the hour to start the snapshot (0-23), defaults to midnight (0). + Hour float64 `json:"hour,omitempty"` + // Minute: Set the minute of the hour to start the snapshot (0-59), defaults to + // the top of the hour (0). + Minute float64 `json:"minute,omitempty"` + // SnapshotsToKeep: The maximum number of Snapshots to keep for the hourly + // schedule + SnapshotsToKeep float64 `json:"snapshotsToKeep,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Hour") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DailySchedule) MarshalJSON() ([]byte, error) { + type NoMethod DailySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *DailySchedule) UnmarshalJSON(data []byte) error { + type NoMethod DailySchedule + var s1 struct { + Hour gensupport.JSONFloat64 `json:"hour"` + Minute gensupport.JSONFloat64 `json:"minute"` + SnapshotsToKeep gensupport.JSONFloat64 `json:"snapshotsToKeep"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Hour = float64(s1.Hour) + s.Minute = float64(s1.Minute) + s.SnapshotsToKeep = float64(s1.SnapshotsToKeep) + return nil +} + +// DestinationVolumeParameters: DestinationVolumeParameters specify input +// parameters used for creating destination volume. +type DestinationVolumeParameters struct { + // Description: Description for the destination volume. + Description string `json:"description,omitempty"` + // ShareName: Destination volume's share name. If not specified, source + // volume's share name will be used. + ShareName string `json:"shareName,omitempty"` + // StoragePool: Required. Existing destination StoragePool name. + StoragePool string `json:"storagePool,omitempty"` + // VolumeId: Desired destination volume resource id. If not specified, source + // volume's resource id will be used. This value must start with a lowercase + // letter followed by up to 62 lowercase letters, numbers, or hyphens, and + // cannot end with a hyphen. + VolumeId string `json:"volumeId,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DestinationVolumeParameters) MarshalJSON() ([]byte, error) { + type NoMethod DestinationVolumeParameters + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type DirectLocationAssignment struct { + Location []*LocationAssignment `json:"location,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Location") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DirectLocationAssignment) MarshalJSON() ([]byte, error) { + type NoMethod DirectLocationAssignment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// EncryptVolumesRequest: EncryptVolumesRequest specifies the KMS config to +// encrypt existing volumes. +type EncryptVolumesRequest struct { +} + +// ExportPolicy: Defines the export policy for the volume. +type ExportPolicy struct { + // Rules: Required. List of export policy rules + Rules []*SimpleExportPolicyRule `json:"rules,omitempty"` + // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Rules") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ExportPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ExtraParameter: Defines parameters that should only be used for specific +// asset types. +type ExtraParameter struct { + // RegionalMigDistributionPolicy: Details about zones used by regional + // compute.googleapis.com/InstanceGroupManager to create instances. + RegionalMigDistributionPolicy *RegionalMigDistributionPolicy `json:"regionalMigDistributionPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RegionalMigDistributionPolicy") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RegionalMigDistributionPolicy") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExtraParameter) MarshalJSON() ([]byte, error) { + type NoMethod ExtraParameter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: 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 GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// HourlySchedule: Make a snapshot every hour e.g. at 04:00, 05:00, 06:00. +type HourlySchedule struct { + // Minute: Set the minute of the hour to start the snapshot (0-59), defaults to + // the top of the hour (0). + Minute float64 `json:"minute,omitempty"` + // SnapshotsToKeep: The maximum number of Snapshots to keep for the hourly + // schedule + SnapshotsToKeep float64 `json:"snapshotsToKeep,omitempty"` + // ForceSendFields is a list of field names (e.g. "Minute") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Minute") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s HourlySchedule) MarshalJSON() ([]byte, error) { + type NoMethod HourlySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *HourlySchedule) UnmarshalJSON(data []byte) error { + type NoMethod HourlySchedule + var s1 struct { + Minute gensupport.JSONFloat64 `json:"minute"` + SnapshotsToKeep gensupport.JSONFloat64 `json:"snapshotsToKeep"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Minute = float64(s1.Minute) + s.SnapshotsToKeep = float64(s1.SnapshotsToKeep) + return nil +} + +type IsolationExpectations struct { + // RequirementOverride: Explicit overrides for ZI and ZS requirements to be + // used for resources that should be excluded from ZI/ZS verification logic. + RequirementOverride *RequirementOverride `json:"requirementOverride,omitempty"` + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZiOrgPolicy string `json:"ziOrgPolicy,omitempty"` + // Possible values: + // "ZI_REGION_POLICY_UNSPECIFIED" + // "ZI_REGION_POLICY_UNKNOWN" - To be used if tracking is not available + // "ZI_REGION_POLICY_NOT_SET" + // "ZI_REGION_POLICY_FAIL_OPEN" + // "ZI_REGION_POLICY_FAIL_CLOSED" + ZiRegionPolicy string `json:"ziRegionPolicy,omitempty"` + // Possible values: + // "ZI_REGION_UNSPECIFIED" + // "ZI_REGION_UNKNOWN" - To be used if tracking is not available + // "ZI_REGION_NOT_ENABLED" + // "ZI_REGION_ENABLED" + ZiRegionState string `json:"ziRegionState,omitempty"` + // ZoneIsolation: Deprecated: use zi_org_policy, zi_region_policy and + // zi_region_state instead for setting ZI expectations as per + // go/zicy-publish-physical-location. + // + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZoneIsolation string `json:"zoneIsolation,omitempty"` + // ZoneSeparation: Deprecated: use zs_org_policy, and zs_region_stateinstead + // for setting Zs expectations as per go/zicy-publish-physical-location. + // + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZoneSeparation string `json:"zoneSeparation,omitempty"` + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZsOrgPolicy string `json:"zsOrgPolicy,omitempty"` + // Possible values: + // "ZS_REGION_UNSPECIFIED" + // "ZS_REGION_UNKNOWN" - To be used if tracking of the asset ZS-bit is not + // available + // "ZS_REGION_NOT_ENABLED" + // "ZS_REGION_ENABLED" + ZsRegionState string `json:"zsRegionState,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequirementOverride") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RequirementOverride") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s IsolationExpectations) MarshalJSON() ([]byte, error) { + type NoMethod IsolationExpectations + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// KmsConfig: KmsConfig is the customer managed encryption key(CMEK) +// configuration. +type KmsConfig struct { + // CreateTime: Output only. Create time of the KmsConfig. + CreateTime string `json:"createTime,omitempty"` + // CryptoKeyName: Required. Customer managed crypto key resource full name. + // Format: + // projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + CryptoKeyName string `json:"cryptoKeyName,omitempty"` + // Description: Description of the KmsConfig. + Description string `json:"description,omitempty"` + // Instructions: Output only. Instructions to provide the access to the + // customer provided encryption key. + Instructions string `json:"instructions,omitempty"` + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. Name of the KmsConfig. + Name string `json:"name,omitempty"` + // ServiceAccount: Output only. The Service account which will have access to + // the customer provided encryption key. + ServiceAccount string `json:"serviceAccount,omitempty"` + // State: Output only. State of the KmsConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified KmsConfig State + // "READY" - KmsConfig State is Ready + // "CREATING" - KmsConfig State is Creating + // "DELETING" - KmsConfig State is Deleting + // "UPDATING" - KmsConfig State is Updating + // "IN_USE" - KmsConfig State is In Use. + // "ERROR" - KmsConfig State is Error + // "KEY_CHECK_PENDING" - KmsConfig State is Pending to verify crypto key + // access. + // "KEY_NOT_REACHABLE" - KmsConfig State is Not accessbile by the SDE service + // account to the crypto key. + // "DISABLING" - KmsConfig State is Disabling. + // "DISABLED" - KmsConfig State is Disabled. + // "MIGRATING" - KmsConfig State is Migrating. The existing volumes are + // migrating from SMEK to CMEK. + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the KmsConfig. + StateDetails string `json:"stateDetails,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s KmsConfig) MarshalJSON() ([]byte, error) { + type NoMethod KmsConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListActiveDirectoriesResponse: ListActiveDirectoriesResponse contains all +// the active directories requested. +type ListActiveDirectoriesResponse struct { + // ActiveDirectories: The list of active directories. + ActiveDirectories []*ActiveDirectory `json:"activeDirectories,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. "ActiveDirectories") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveDirectories") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListActiveDirectoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListActiveDirectoriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListBackupPoliciesResponse: ListBackupPoliciesResponse contains all the +// backup policies requested. +type ListBackupPoliciesResponse struct { + // BackupPolicies: The list of backup policies. + BackupPolicies []*BackupPolicy `json:"backupPolicies,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. "BackupPolicies") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupPolicies") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupPoliciesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListBackupVaultsResponse: ListBackupVaultsResponse is the result of +// ListBackupVaultsRequest. +type ListBackupVaultsResponse struct { + // BackupVaults: A list of backupVaults in the project for the specified + // location. + BackupVaults []*BackupVault `json:"backupVaults,omitempty"` + // NextPageToken: The token you can use to retrieve the next page of results. + // Not returned if there are no more results in the list. + 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. "BackupVaults") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupVaults") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupVaultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupVaultsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListBackupsResponse: ListBackupsResponse is the result of +// ListBackupsRequest. +type ListBackupsResponse struct { + // Backups: A list of backups in the project. + Backups []*Backup `json:"backups,omitempty"` + // NextPageToken: The token you can use to retrieve the next page of results. + // Not returned if there are no more results in the list. + 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. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListKmsConfigsResponse: ListKmsConfigsResponse is the response to a +// ListKmsConfigsRequest. +type ListKmsConfigsResponse struct { + // KmsConfigs: The list of KmsConfigs + KmsConfigs []*KmsConfig `json:"kmsConfigs,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. "KmsConfigs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "KmsConfigs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListKmsConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListKmsConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListReplicationsResponse: ListReplicationsResponse is the result of +// ListReplicationsRequest. +type ListReplicationsResponse struct { + // NextPageToken: The token you can use to retrieve the next page of results. + // Not returned if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Replications: A list of replications in the project for the specified + // volume. + Replications []*Replication `json:"replications,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. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListReplicationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListReplicationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListSnapshotsResponse: ListSnapshotsResponse is the result of +// ListSnapshotsRequest. +type ListSnapshotsResponse struct { + // NextPageToken: The token you can use to retrieve the next page of results. + // Not returned if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Snapshots: A list of snapshots in the project for the specified volume. + Snapshots []*Snapshot `json:"snapshots,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. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListSnapshotsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSnapshotsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListStoragePoolsResponse: ListStoragePoolsResponse is the response to a +// ListStoragePoolsRequest. +type ListStoragePoolsResponse struct { + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // StoragePools: The list of StoragePools + StoragePools []*StoragePool `json:"storagePools,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. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListStoragePoolsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListStoragePoolsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListVolumesResponse: Message for response to listing Volumes +type ListVolumesResponse struct { + // 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"` + // Volumes: The list of Volume + Volumes []*Volume `json:"volumes,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListVolumesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListVolumesResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type LocationAssignment struct { + Location string `json:"location,omitempty"` + // Possible values: + // "UNSPECIFIED" + // "CLUSTER" - 1-10: Physical failure domains. + // "POP" + // "CLOUD_ZONE" - 11-20: Logical failure domains. + // "CLOUD_REGION" + // "MULTI_REGION_GEO" + // "MULTI_REGION_JURISDICTION" + // "GLOBAL" + // "OTHER" + LocationType string `json:"locationType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Location") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LocationAssignment) MarshalJSON() ([]byte, error) { + type NoMethod LocationAssignment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type LocationData struct { + BlobstoreLocation *BlobstoreLocation `json:"blobstoreLocation,omitempty"` + ChildAssetLocation *CloudAssetComposition `json:"childAssetLocation,omitempty"` + DirectLocation *DirectLocationAssignment `json:"directLocation,omitempty"` + GcpProjectProxy *TenantProjectProxy `json:"gcpProjectProxy,omitempty"` + PlacerLocation *PlacerLocation `json:"placerLocation,omitempty"` + SpannerLocation *SpannerLocation `json:"spannerLocation,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlobstoreLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlobstoreLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LocationData) MarshalJSON() ([]byte, error) { + type NoMethod LocationData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// LocationMetadata: Metadata for a given google.cloud.location.Location. +type LocationMetadata struct { + // SupportedServiceLevels: Output only. Supported service levels in a location. + // + // Possible values: + // "SERVICE_LEVEL_UNSPECIFIED" - Unspecified service level. + // "PREMIUM" - Premium service level. + // "EXTREME" - Extreme service level. + // "STANDARD" - Standard service level. + // "FLEX" - Flex service level. + SupportedServiceLevels []string `json:"supportedServiceLevels,omitempty"` + // ForceSendFields is a list of field names (e.g. "SupportedServiceLevels") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SupportedServiceLevels") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod LocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MonthlySchedule: Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, +// 24th 23:50 +type MonthlySchedule struct { + // DaysOfMonth: Set the day or days of the month to make a snapshot (1-31). + // Accepts a comma separated number of days. Defaults to '1'. + DaysOfMonth string `json:"daysOfMonth,omitempty"` + // Hour: Set the hour to start the snapshot (0-23), defaults to midnight (0). + Hour float64 `json:"hour,omitempty"` + // Minute: Set the minute of the hour to start the snapshot (0-59), defaults to + // the top of the hour (0). + Minute float64 `json:"minute,omitempty"` + // SnapshotsToKeep: The maximum number of Snapshots to keep for the hourly + // schedule + SnapshotsToKeep float64 `json:"snapshotsToKeep,omitempty"` + // ForceSendFields is a list of field names (e.g. "DaysOfMonth") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DaysOfMonth") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MonthlySchedule) MarshalJSON() ([]byte, error) { + type NoMethod MonthlySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *MonthlySchedule) UnmarshalJSON(data []byte) error { + type NoMethod MonthlySchedule + var s1 struct { + Hour gensupport.JSONFloat64 `json:"hour"` + Minute gensupport.JSONFloat64 `json:"minute"` + SnapshotsToKeep gensupport.JSONFloat64 `json:"snapshotsToKeep"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Hour = float64(s1.Hour) + s.Minute = float64(s1.Minute) + s.SnapshotsToKeep = float64(s1.SnapshotsToKeep) + return nil +} + +// MountOption: View only mount options for a volume. +type MountOption struct { + // Export: Export string + Export string `json:"export,omitempty"` + // ExportFull: Full export string + ExportFull string `json:"exportFull,omitempty"` + // Instructions: Instructions for mounting + Instructions string `json:"instructions,omitempty"` + // Protocol: Protocol to mount with. + // + // Possible values: + // "PROTOCOLS_UNSPECIFIED" - Unspecified protocol + // "NFSV3" - NFS V3 protocol + // "NFSV4" - NFS V4 protocol + // "SMB" - SMB protocol + Protocol string `json:"protocol,omitempty"` + // ForceSendFields is a list of field names (e.g. "Export") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Export") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MountOption) MarshalJSON() ([]byte, error) { + type NoMethod MountOption + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(s), 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 been canceled + // successfully 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PlacerLocation: Message describing that the location of the customer +// resource is tied to placer allocations +type PlacerLocation struct { + // PlacerConfig: Directory with a config related to it in placer (e.g. + // "/placer/prod/home/my-root/my-dir") + PlacerConfig string `json:"placerConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PlacerConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PlacerConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PlacerLocation) MarshalJSON() ([]byte, error) { + type NoMethod PlacerLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RegionalMigDistributionPolicy: To be used for specifying the intended +// distribution of regional compute.googleapis.com/InstanceGroupManager +// instances +type RegionalMigDistributionPolicy struct { + // TargetShape: The shape in which the group converges around distribution of + // resources. Instance of proto2 enum + TargetShape int64 `json:"targetShape,omitempty"` + // Zones: Cloud zones used by regional MIG to create instances. + Zones []*ZoneConfiguration `json:"zones,omitempty"` + // ForceSendFields is a list of field names (e.g. "TargetShape") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TargetShape") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RegionalMigDistributionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RegionalMigDistributionPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Replication: Replication is a nested resource under Volume, that describes a +// cross-region replication relationship between 2 volumes in different +// regions. +type Replication struct { + // CreateTime: Output only. Replication create time. + CreateTime string `json:"createTime,omitempty"` + // Description: A description about this replication relationship. + Description string `json:"description,omitempty"` + // DestinationVolume: Output only. Full name of destination volume resource. + // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + DestinationVolume string `json:"destinationVolume,omitempty"` + // DestinationVolumeParameters: Required. Input only. Destination volume + // parameters + DestinationVolumeParameters *DestinationVolumeParameters `json:"destinationVolumeParameters,omitempty"` + // Healthy: Output only. Condition of the relationship. Can be one of the + // following: - true: The replication relationship is healthy. It has not + // missed the most recent scheduled transfer. - false: The replication + // relationship is not healthy. It has missed the most recent scheduled + // transfer. + Healthy bool `json:"healthy,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // MirrorState: Output only. Indicates the state of mirroring. + // + // Possible values: + // "MIRROR_STATE_UNSPECIFIED" - Unspecified MirrorState + // "PREPARING" - Destination volume is being prepared. + // "MIRRORED" - Destination volume has been initialized and is ready to + // receive replication transfers. + // "STOPPED" - Destination volume is not receiving replication transfers. + // "TRANSFERRING" - Incremental replication is in progress. + MirrorState string `json:"mirrorState,omitempty"` + // Name: Identifier. The resource name of the Replication. Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/ + // {replication_id}`. + Name string `json:"name,omitempty"` + // ReplicationSchedule: Required. Indicates the schedule for replication. + // + // Possible values: + // "REPLICATION_SCHEDULE_UNSPECIFIED" - Unspecified ReplicationSchedule + // "EVERY_10_MINUTES" - Replication happens once every 10 minutes. + // "HOURLY" - Replication happens once every hour. + // "DAILY" - Replication happens once every day. + ReplicationSchedule string `json:"replicationSchedule,omitempty"` + // Role: Output only. Indicates whether this points to source or destination. + // + // Possible values: + // "REPLICATION_ROLE_UNSPECIFIED" - Unspecified replication role + // "SOURCE" - Indicates Source volume. + // "DESTINATION" - Indicates Destination volume. + Role string `json:"role,omitempty"` + // SourceVolume: Output only. Full name of source volume resource. Example : + // "projects/{project}/locations/{location}/volumes/{volume_id}" + SourceVolume string `json:"sourceVolume,omitempty"` + // State: Output only. State of the replication. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified replication State + // "CREATING" - Replication is creating. + // "READY" - Replication is ready. + // "UPDATING" - Replication is updating. + // "DELETING" - Replication is deleting. + // "ERROR" - Replication is in error state. + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the replication. + StateDetails string `json:"stateDetails,omitempty"` + // TransferStats: Output only. Replication transfer statistics. + TransferStats *TransferStats `json:"transferStats,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Replication) MarshalJSON() ([]byte, error) { + type NoMethod Replication + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RequirementOverride struct { + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZiOverride string `json:"ziOverride,omitempty"` + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZsOverride string `json:"zsOverride,omitempty"` + // ForceSendFields is a list of field names (e.g. "ZiOverride") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ZiOverride") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RequirementOverride) MarshalJSON() ([]byte, error) { + type NoMethod RequirementOverride + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RestoreParameters: The RestoreParameters if volume is created from a +// snapshot or backup. +type RestoreParameters struct { + // SourceBackup: Full name of the backup resource. Format: + // projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backup + // s/{backup_id} + SourceBackup string `json:"sourceBackup,omitempty"` + // SourceSnapshot: Full name of the snapshot resource. Format: + // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + SourceSnapshot string `json:"sourceSnapshot,omitempty"` + // ForceSendFields is a list of field names (e.g. "SourceBackup") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SourceBackup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RestoreParameters) MarshalJSON() ([]byte, error) { + type NoMethod RestoreParameters + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ResumeReplicationRequest: ResumeReplicationRequest resumes a stopped +// replication. +type ResumeReplicationRequest struct { +} + +// ReverseReplicationDirectionRequest: ReverseReplicationDirectionRequest +// reverses direction of replication. Source becomes destination and +// destination becomes source. +type ReverseReplicationDirectionRequest struct { +} + +// RevertVolumeRequest: RevertVolumeRequest reverts the given volume to the +// specified snapshot. +type RevertVolumeRequest struct { + // SnapshotId: Required. The snapshot resource ID, in the format 'my-snapshot', + // where the specified ID is the {snapshot_id} of the fully qualified name like + // projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{ + // snapshot_id} + SnapshotId string `json:"snapshotId,omitempty"` + // ForceSendFields is a list of field names (e.g. "SnapshotId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SnapshotId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RevertVolumeRequest) MarshalJSON() ([]byte, error) { + type NoMethod RevertVolumeRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SimpleExportPolicyRule: An export policy rule describing various export +// options. +type SimpleExportPolicyRule struct { + // AccessType: Access type (ReadWrite, ReadOnly, None) + // + // Possible values: + // "ACCESS_TYPE_UNSPECIFIED" - Unspecified Access Type + // "READ_ONLY" - Read Only + // "READ_WRITE" - Read Write + // "READ_NONE" - None + AccessType string `json:"accessType,omitempty"` + // AllowedClients: Comma separated list of allowed clients IP addresses + AllowedClients string `json:"allowedClients,omitempty"` + // HasRootAccess: Whether Unix root access will be granted. + HasRootAccess string `json:"hasRootAccess,omitempty"` + // Kerberos5ReadOnly: If enabled (true) the rule defines a read only access for + // clients matching the 'allowedClients' specification. It enables nfs clients + // to mount using 'authentication' kerberos security mode. + Kerberos5ReadOnly bool `json:"kerberos5ReadOnly,omitempty"` + // Kerberos5ReadWrite: If enabled (true) the rule defines read and write access + // for clients matching the 'allowedClients' specification. It enables nfs + // clients to mount using 'authentication' kerberos security mode. The + // 'kerberos5ReadOnly' value be ignored if this is enabled. + Kerberos5ReadWrite bool `json:"kerberos5ReadWrite,omitempty"` + // Kerberos5iReadOnly: If enabled (true) the rule defines a read only access + // for clients matching the 'allowedClients' specification. It enables nfs + // clients to mount using 'integrity' kerberos security mode. + Kerberos5iReadOnly bool `json:"kerberos5iReadOnly,omitempty"` + // Kerberos5iReadWrite: If enabled (true) the rule defines read and write + // access for clients matching the 'allowedClients' specification. It enables + // nfs clients to mount using 'integrity' kerberos security mode. The + // 'kerberos5iReadOnly' value be ignored if this is enabled. + Kerberos5iReadWrite bool `json:"kerberos5iReadWrite,omitempty"` + // Kerberos5pReadOnly: If enabled (true) the rule defines a read only access + // for clients matching the 'allowedClients' specification. It enables nfs + // clients to mount using 'privacy' kerberos security mode. + Kerberos5pReadOnly bool `json:"kerberos5pReadOnly,omitempty"` + // Kerberos5pReadWrite: If enabled (true) the rule defines read and write + // access for clients matching the 'allowedClients' specification. It enables + // nfs clients to mount using 'privacy' kerberos security mode. The + // 'kerberos5pReadOnly' value be ignored if this is enabled. + Kerberos5pReadWrite bool `json:"kerberos5pReadWrite,omitempty"` + // Nfsv3: NFS V3 protocol. + Nfsv3 bool `json:"nfsv3,omitempty"` + // Nfsv4: NFS V4 protocol. + Nfsv4 bool `json:"nfsv4,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccessType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccessType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SimpleExportPolicyRule) MarshalJSON() ([]byte, error) { + type NoMethod SimpleExportPolicyRule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Snapshot: Snapshot is a point-in-time version of a Volume's content. +type Snapshot struct { + // CreateTime: Output only. The time when the snapshot was created. + CreateTime string `json:"createTime,omitempty"` + // Description: A description of the snapshot with 2048 characters or less. + // Requests with longer descriptions will be rejected. + Description string `json:"description,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the snapshot. Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{sn + // apshot_id}`. + Name string `json:"name,omitempty"` + // State: Output only. The snapshot state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified Snapshot State + // "READY" - Snapshot State is Ready + // "CREATING" - Snapshot State is Creating + // "DELETING" - Snapshot State is Deleting + // "UPDATING" - Snapshot State is Updating + // "DISABLED" - Snapshot State is Disabled + // "ERROR" - Snapshot State is Error + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the storage pool + StateDetails string `json:"stateDetails,omitempty"` + // UsedBytes: Output only. Current storage usage for the snapshot in bytes. + UsedBytes float64 `json:"usedBytes,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Snapshot) MarshalJSON() ([]byte, error) { + type NoMethod Snapshot + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *Snapshot) UnmarshalJSON(data []byte) error { + type NoMethod Snapshot + var s1 struct { + UsedBytes gensupport.JSONFloat64 `json:"usedBytes"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.UsedBytes = float64(s1.UsedBytes) + return nil +} + +// SnapshotPolicy: Snapshot Policy for a volume. +type SnapshotPolicy struct { + // DailySchedule: Daily schedule policy. + DailySchedule *DailySchedule `json:"dailySchedule,omitempty"` + // Enabled: If enabled, make snapshots automatically according to the + // schedules. Default is false. + Enabled bool `json:"enabled,omitempty"` + // HourlySchedule: Hourly schedule policy. + HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"` + // MonthlySchedule: Monthly schedule policy. + MonthlySchedule *MonthlySchedule `json:"monthlySchedule,omitempty"` + // WeeklySchedule: Weekly schedule policy. + WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` + // ForceSendFields is a list of field names (e.g. "DailySchedule") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DailySchedule") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SnapshotPolicy) MarshalJSON() ([]byte, error) { + type NoMethod SnapshotPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type SpannerLocation struct { + // BackupName: Set of backups used by the resource with name in the same format + // as what is available at http://table/spanner_automon.backup_metadata + BackupName []string `json:"backupName,omitempty"` + // DbName: Set of databases used by the resource in format /span// + DbName []string `json:"dbName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SpannerLocation) MarshalJSON() ([]byte, error) { + type NoMethod SpannerLocation + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// StopReplicationRequest: StopReplicationRequest stops a replication until +// resumed. +type StopReplicationRequest struct { + // Force: Indicates whether to stop replication forcefully while data transfer + // is in progress. Warning! if force is true, this will abort any current + // transfers and can lead to data loss due to partial transfer. If force is + // false, stop replication will fail while data transfer is in progress and you + // will need to retry later. + Force bool `json:"force,omitempty"` + // ForceSendFields is a list of field names (e.g. "Force") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Force") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s StopReplicationRequest) MarshalJSON() ([]byte, error) { + type NoMethod StopReplicationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// StoragePool: StoragePool is a container for volumes with a service level and +// capacity. Volumes can be created in a pool of sufficient available capacity. +// StoragePool capacity is what you are billed for. +type StoragePool struct { + // ActiveDirectory: Optional. Specifies the Active Directory to be used for + // creating a SMB volume. + ActiveDirectory string `json:"activeDirectory,omitempty"` + // AllowAutoTiering: Optional. True if the storage pool supports Auto Tiering + // enabled volumes. Default is false. Auto-tiering can be enabled after storage + // pool creation but it can't be disabled once enabled. + AllowAutoTiering bool `json:"allowAutoTiering,omitempty"` + // CapacityGib: Required. Capacity in GIB of the pool + CapacityGib int64 `json:"capacityGib,omitempty,string"` + // CreateTime: Output only. Create time of the storage pool + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. Description of the storage pool + Description string `json:"description,omitempty"` + // EncryptionType: Output only. Specifies the current pool encryption key + // source. + // + // Possible values: + // "ENCRYPTION_TYPE_UNSPECIFIED" - The source of the encryption key is not + // specified. + // "SERVICE_MANAGED" - Google managed encryption key. + // "CLOUD_KMS" - Customer managed encryption key, which is stored in KMS. + EncryptionType string `json:"encryptionType,omitempty"` + // GlobalAccessAllowed: Deprecated. Used to allow SO pool to access AD or DNS + // server from other regions. + GlobalAccessAllowed bool `json:"globalAccessAllowed,omitempty"` + // KmsConfig: Optional. Specifies the KMS config to be used for volume + // encryption. + KmsConfig string `json:"kmsConfig,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // LdapEnabled: Optional. Flag indicating if the pool is NFS LDAP enabled or + // not. + LdapEnabled bool `json:"ldapEnabled,omitempty"` + // Name: Identifier. Name of the storage pool + Name string `json:"name,omitempty"` + // Network: Required. VPC Network name. Format: + // projects/{project}/global/networks/{network} + Network string `json:"network,omitempty"` + // PsaRange: Optional. This field is not implemented. The values provided in + // this field are ignored. + PsaRange string `json:"psaRange,omitempty"` + // ReplicaZone: Optional. Specifies the replica zone for regional storagePool. + ReplicaZone string `json:"replicaZone,omitempty"` + // ServiceLevel: Required. Service level of the storage pool + // + // Possible values: + // "SERVICE_LEVEL_UNSPECIFIED" - Unspecified service level. + // "PREMIUM" - Premium service level. + // "EXTREME" - Extreme service level. + // "STANDARD" - Standard service level. + // "FLEX" - Flex service level. + ServiceLevel string `json:"serviceLevel,omitempty"` + // State: Output only. State of the storage pool + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified Storage Pool State + // "READY" - Storage Pool State is Ready + // "CREATING" - Storage Pool State is Creating + // "DELETING" - Storage Pool State is Deleting + // "UPDATING" - Storage Pool State is Updating + // "RESTORING" - Storage Pool State is Restoring + // "DISABLED" - Storage Pool State is Disabled + // "ERROR" - Storage Pool State is Error + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the storage pool + StateDetails string `json:"stateDetails,omitempty"` + // VolumeCapacityGib: Output only. Allocated size of all volumes in GIB in the + // storage pool + VolumeCapacityGib int64 `json:"volumeCapacityGib,omitempty,string"` + // VolumeCount: Output only. Volume count of the storage pool + VolumeCount int64 `json:"volumeCount,omitempty"` + // Zone: Optional. Specifies the active zone for regional storagePool. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ActiveDirectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveDirectory") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s StoragePool) MarshalJSON() ([]byte, error) { + type NoMethod StoragePool + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SwitchActiveReplicaZoneRequest: SwitchActiveReplicaZoneRequest switch the +// active/replica zone for a regional storagePool. +type SwitchActiveReplicaZoneRequest struct { +} + +type TenantProjectProxy struct { + ProjectNumbers []string `json:"projectNumbers,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProjectNumbers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProjectNumbers") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TenantProjectProxy) MarshalJSON() ([]byte, error) { + type NoMethod TenantProjectProxy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TieringPolicy: Defines tiering policy for the volume. +type TieringPolicy struct { + // CoolingThresholdDays: Optional. Time in days to mark the volume's data block + // as cold and make it eligible for tiering, can be range from 7-183. Default + // is 31. + CoolingThresholdDays int64 `json:"coolingThresholdDays,omitempty"` + // TierAction: Optional. Flag indicating if the volume has tiering policy + // enable/pause. Default is PAUSED. + // + // Possible values: + // "TIER_ACTION_UNSPECIFIED" - Unspecified. + // "ENABLED" - When tiering is enabled, new cold data will be tiered. + // "PAUSED" - When paused, tiering won't be performed on new data. Existing + // data stays tiered until accessed. + TierAction string `json:"tierAction,omitempty"` + // ForceSendFields is a list of field names (e.g. "CoolingThresholdDays") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CoolingThresholdDays") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TieringPolicy) MarshalJSON() ([]byte, error) { + type NoMethod TieringPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TransferStats: TransferStats reports all statistics related to replication +// transfer. +type TransferStats struct { + // LagDuration: Lag duration indicates the duration by which Destination region + // volume content lags behind the primary region volume content. + LagDuration string `json:"lagDuration,omitempty"` + // LastTransferBytes: Last transfer size in bytes. + LastTransferBytes int64 `json:"lastTransferBytes,omitempty,string"` + // LastTransferDuration: Time taken during last transfer. + LastTransferDuration string `json:"lastTransferDuration,omitempty"` + // LastTransferEndTime: Time when last transfer completed. + LastTransferEndTime string `json:"lastTransferEndTime,omitempty"` + // LastTransferError: A message describing the cause of the last transfer + // failure. + LastTransferError string `json:"lastTransferError,omitempty"` + // TotalTransferDuration: Cumulative time taken across all transfers for the + // replication relationship. + TotalTransferDuration string `json:"totalTransferDuration,omitempty"` + // TransferBytes: Cumulative bytes trasferred so far for the replication + // relatinonship. + TransferBytes int64 `json:"transferBytes,omitempty,string"` + // UpdateTime: Time when progress was updated last. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "LagDuration") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LagDuration") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TransferStats) MarshalJSON() ([]byte, error) { + type NoMethod TransferStats + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// VerifyKmsConfigRequest: VerifyKmsConfigRequest specifies the KMS config to +// be validated. +type VerifyKmsConfigRequest struct { +} + +// VerifyKmsConfigResponse: VerifyKmsConfigResponse contains the information if +// the config is correctly and error message. +type VerifyKmsConfigResponse struct { + // HealthError: Output only. Error message if config is not healthy. + HealthError string `json:"healthError,omitempty"` + // Healthy: Output only. If the customer key configured correctly to the + // encrypt volume. + Healthy bool `json:"healthy,omitempty"` + // Instructions: Output only. Instructions for the customers to provide the + // access to the encryption key. + Instructions string `json:"instructions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "HealthError") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HealthError") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s VerifyKmsConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod VerifyKmsConfigResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Volume: Volume provides a filesystem that you can mount. +type Volume struct { + // ActiveDirectory: Output only. Specifies the ActiveDirectory name of a SMB + // volume. + ActiveDirectory string `json:"activeDirectory,omitempty"` + // BackupConfig: BackupConfig of the volume. + BackupConfig *BackupConfig `json:"backupConfig,omitempty"` + // CapacityGib: Required. Capacity in GIB of the volume + CapacityGib int64 `json:"capacityGib,omitempty,string"` + // ColdTierSizeGib: Output only. Size of the volume cold tier data in GiB. + ColdTierSizeGib int64 `json:"coldTierSizeGib,omitempty,string"` + // CreateTime: Output only. Create time of the volume + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. Description of the volume + Description string `json:"description,omitempty"` + // EncryptionType: Output only. Specified the current volume encryption key + // source. + // + // Possible values: + // "ENCRYPTION_TYPE_UNSPECIFIED" - The source of the encryption key is not + // specified. + // "SERVICE_MANAGED" - Google managed encryption key. + // "CLOUD_KMS" - Customer managed encryption key, which is stored in KMS. + EncryptionType string `json:"encryptionType,omitempty"` + // ExportPolicy: Optional. Export policy of the volume + ExportPolicy *ExportPolicy `json:"exportPolicy,omitempty"` + // HasReplication: Output only. Indicates whether the volume is part of a + // replication relationship. + HasReplication bool `json:"hasReplication,omitempty"` + // KerberosEnabled: Optional. Flag indicating if the volume is a kerberos + // volume or not, export policy rules control kerberos security modes (krb5, + // krb5i, krb5p). + KerberosEnabled bool `json:"kerberosEnabled,omitempty"` + // KmsConfig: Output only. Specifies the KMS config to be used for volume + // encryption. + KmsConfig string `json:"kmsConfig,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // LargeCapacity: Optional. Flag indicating if the volume will be a large + // capacity volume or a regular volume. + LargeCapacity bool `json:"largeCapacity,omitempty"` + // LdapEnabled: Output only. Flag indicating if the volume is NFS LDAP enabled + // or not. + LdapEnabled bool `json:"ldapEnabled,omitempty"` + // MountOptions: Output only. Mount options of this volume + MountOptions []*MountOption `json:"mountOptions,omitempty"` + // MultipleEndpoints: Optional. Flag indicating if the volume will have an IP + // address per node for volumes supporting multiple IP endpoints. Only the + // volume with large_capacity will be allowed to have multiple endpoints. + MultipleEndpoints bool `json:"multipleEndpoints,omitempty"` + // Name: Identifier. Name of the volume + Name string `json:"name,omitempty"` + // Network: Output only. VPC Network name. Format: + // projects/{project}/global/networks/{network} + Network string `json:"network,omitempty"` + // Protocols: Required. Protocols required for the volume + // + // Possible values: + // "PROTOCOLS_UNSPECIFIED" - Unspecified protocol + // "NFSV3" - NFS V3 protocol + // "NFSV4" - NFS V4 protocol + // "SMB" - SMB protocol + Protocols []string `json:"protocols,omitempty"` + // PsaRange: Output only. This field is not implemented. The values provided in + // this field are ignored. + PsaRange string `json:"psaRange,omitempty"` + // ReplicaZone: Output only. Specifies the replica zone for regional volume. + ReplicaZone string `json:"replicaZone,omitempty"` + // RestoreParameters: Optional. Specifies the source of the volume to be + // created from. + RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"` + // RestrictedActions: Optional. List of actions that are restricted on this + // volume. + // + // Possible values: + // "RESTRICTED_ACTION_UNSPECIFIED" - Unspecified restricted action + // "DELETE" - Prevent volume from being deleted when mounted. + RestrictedActions []string `json:"restrictedActions,omitempty"` + // SecurityStyle: Optional. Security Style of the Volume + // + // Possible values: + // "SECURITY_STYLE_UNSPECIFIED" - SecurityStyle is unspecified + // "NTFS" - SecurityStyle uses NTFS + // "UNIX" - SecurityStyle uses UNIX + SecurityStyle string `json:"securityStyle,omitempty"` + // ServiceLevel: Output only. Service level of the volume + // + // Possible values: + // "SERVICE_LEVEL_UNSPECIFIED" - Unspecified service level. + // "PREMIUM" - Premium service level. + // "EXTREME" - Extreme service level. + // "STANDARD" - Standard service level. + // "FLEX" - Flex service level. + ServiceLevel string `json:"serviceLevel,omitempty"` + // ShareName: Required. Share name of the volume + ShareName string `json:"shareName,omitempty"` + // SmbSettings: Optional. SMB share settings for the volume. + // + // Possible values: + // "SMB_SETTINGS_UNSPECIFIED" - Unspecified default option + // "ENCRYPT_DATA" - SMB setting encrypt data + // "BROWSABLE" - SMB setting browsable + // "CHANGE_NOTIFY" - SMB setting notify change + // "NON_BROWSABLE" - SMB setting not to notify change + // "OPLOCKS" - SMB setting oplocks + // "SHOW_SNAPSHOT" - SMB setting to show snapshots + // "SHOW_PREVIOUS_VERSIONS" - SMB setting to show previous versions + // "ACCESS_BASED_ENUMERATION" - SMB setting to access volume based on + // enumerartion + // "CONTINUOUSLY_AVAILABLE" - Continuously available enumeration + SmbSettings []string `json:"smbSettings,omitempty"` + // SnapReserve: Optional. Snap_reserve specifies percentage of volume storage + // reserved for snapshot storage. Default is 0 percent. + SnapReserve float64 `json:"snapReserve,omitempty"` + // SnapshotDirectory: Optional. Snapshot_directory if enabled (true) the volume + // will contain a read-only .snapshot directory which provides access to each + // of the volume's snapshots. + SnapshotDirectory bool `json:"snapshotDirectory,omitempty"` + // SnapshotPolicy: Optional. SnapshotPolicy for a volume. + SnapshotPolicy *SnapshotPolicy `json:"snapshotPolicy,omitempty"` + // State: Output only. State of the volume + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified Volume State + // "READY" - Volume State is Ready + // "CREATING" - Volume State is Creating + // "DELETING" - Volume State is Deleting + // "UPDATING" - Volume State is Updating + // "RESTORING" - Volume State is Restoring + // "DISABLED" - Volume State is Disabled + // "ERROR" - Volume State is Error + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the volume + StateDetails string `json:"stateDetails,omitempty"` + // StoragePool: Required. StoragePool name of the volume + StoragePool string `json:"storagePool,omitempty"` + // TieringPolicy: Tiering policy for the volume. + TieringPolicy *TieringPolicy `json:"tieringPolicy,omitempty"` + // UnixPermissions: Optional. Default unix style permission (e.g. 777) the + // mount point will be created with. Applicable for NFS protocol types only. + UnixPermissions string `json:"unixPermissions,omitempty"` + // UsedGib: Output only. Used capacity in GIB of the volume. This is computed + // periodically and it does not represent the realtime usage. + UsedGib int64 `json:"usedGib,omitempty,string"` + // Zone: Output only. Specifies the active zone for regional volume. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ActiveDirectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveDirectory") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Volume) MarshalJSON() ([]byte, error) { + type NoMethod Volume + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *Volume) UnmarshalJSON(data []byte) error { + type NoMethod Volume + var s1 struct { + SnapReserve gensupport.JSONFloat64 `json:"snapReserve"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SnapReserve = float64(s1.SnapReserve) + return nil +} + +// WeeklySchedule: Make a snapshot every week e.g. at Monday 04:00, Wednesday +// 05:20, Sunday 23:50 +type WeeklySchedule struct { + // Day: Set the day or days of the week to make a snapshot. Accepts a comma + // separated days of the week. Defaults to 'Sunday'. + Day string `json:"day,omitempty"` + // Hour: Set the hour to start the snapshot (0-23), defaults to midnight (0). + Hour float64 `json:"hour,omitempty"` + // Minute: Set the minute of the hour to start the snapshot (0-59), defaults to + // the top of the hour (0). + Minute float64 `json:"minute,omitempty"` + // SnapshotsToKeep: The maximum number of Snapshots to keep for the hourly + // schedule + SnapshotsToKeep float64 `json:"snapshotsToKeep,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Day") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s WeeklySchedule) MarshalJSON() ([]byte, error) { + type NoMethod WeeklySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *WeeklySchedule) UnmarshalJSON(data []byte) error { + type NoMethod WeeklySchedule + var s1 struct { + Hour gensupport.JSONFloat64 `json:"hour"` + Minute gensupport.JSONFloat64 `json:"minute"` + SnapshotsToKeep gensupport.JSONFloat64 `json:"snapshotsToKeep"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Hour = float64(s1.Hour) + s.Minute = float64(s1.Minute) + s.SnapshotsToKeep = float64(s1.SnapshotsToKeep) + return nil +} + +type ZoneConfiguration struct { + Zone string `json:"zone,omitempty"` + // ForceSendFields is a list of field names (e.g. "Zone") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Zone") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ZoneConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod ZoneConfiguration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +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 +// details. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.get" call. +// 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 +} + +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 +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.list" call. +// 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 +} + +// 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")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsActiveDirectoriesCreateCall struct { + s *Service + parent string + activedirectory *ActiveDirectory + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: CreateActiveDirectory Creates the active directory specified in the +// request. +// +// - parent: Value for parent. +func (r *ProjectsLocationsActiveDirectoriesService) Create(parent string, activedirectory *ActiveDirectory) *ProjectsLocationsActiveDirectoriesCreateCall { + c := &ProjectsLocationsActiveDirectoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.activedirectory = activedirectory + return c +} + +// ActiveDirectoryId sets the optional parameter "activeDirectoryId": Required. +// ID of the active directory to create. Must be unique within the parent +// resource. Must contain only letters, numbers and hyphen, with the first +// character a letter , the last a letter or a number, and a 63 character +// maximum. +func (c *ProjectsLocationsActiveDirectoriesCreateCall) ActiveDirectoryId(activeDirectoryId string) *ProjectsLocationsActiveDirectoriesCreateCall { + c.urlParams_.Set("activeDirectoryId", activeDirectoryId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsActiveDirectoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.activedirectory) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/activeDirectories") + 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 "netapp.projects.locations.activeDirectories.create" call. +// 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 *ProjectsLocationsActiveDirectoriesCreateCall) 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 +} + +type ProjectsLocationsActiveDirectoriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete the active directory specified in the request. +// +// - name: Name of the active directory. +func (r *ProjectsLocationsActiveDirectoriesService) Delete(name string) *ProjectsLocationsActiveDirectoriesDeleteCall { + c := &ProjectsLocationsActiveDirectoriesDeleteCall{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 +// details. +func (c *ProjectsLocationsActiveDirectoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.activeDirectories.delete" call. +// 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 *ProjectsLocationsActiveDirectoriesDeleteCall) 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 +} + +type ProjectsLocationsActiveDirectoriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes a specified active directory. +// +// - name: Name of the active directory. +func (r *ProjectsLocationsActiveDirectoriesService) Get(name string) *ProjectsLocationsActiveDirectoriesGetCall { + c := &ProjectsLocationsActiveDirectoriesGetCall{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 +// details. +func (c *ProjectsLocationsActiveDirectoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsActiveDirectoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsActiveDirectoriesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesGetCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.activeDirectories.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *ActiveDirectory.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 *ProjectsLocationsActiveDirectoriesGetCall) Do(opts ...googleapi.CallOption) (*ActiveDirectory, 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 := &ActiveDirectory{ + 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 +} + +type ProjectsLocationsActiveDirectoriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists active directories. +// +// - parent: Parent value for ListActiveDirectoriesRequest. +func (r *ProjectsLocationsActiveDirectoriesService) List(parent string) *ProjectsLocationsActiveDirectoriesListCall { + c := &ProjectsLocationsActiveDirectoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsActiveDirectoriesListCall) Filter(filter string) *ProjectsLocationsActiveDirectoriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsActiveDirectoriesListCall) OrderBy(orderBy string) *ProjectsLocationsActiveDirectoriesListCall { + 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, the server will pick +// an appropriate default. +func (c *ProjectsLocationsActiveDirectoriesListCall) PageSize(pageSize int64) *ProjectsLocationsActiveDirectoriesListCall { + 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 *ProjectsLocationsActiveDirectoriesListCall) PageToken(pageToken string) *ProjectsLocationsActiveDirectoriesListCall { + 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 +// details. +func (c *ProjectsLocationsActiveDirectoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsActiveDirectoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsActiveDirectoriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesListCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/activeDirectories") + 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 "netapp.projects.locations.activeDirectories.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListActiveDirectoriesResponse.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 *ProjectsLocationsActiveDirectoriesListCall) Do(opts ...googleapi.CallOption) (*ListActiveDirectoriesResponse, 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 := &ListActiveDirectoriesResponse{ + 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 +} + +// 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 *ProjectsLocationsActiveDirectoriesListCall) Pages(ctx context.Context, f func(*ListActiveDirectoriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsActiveDirectoriesPatchCall struct { + s *Service + name string + activedirectory *ActiveDirectory + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update the parameters of an active directories. +// +// - name: Identifier. The resource name of the active directory. Format: +// `projects/{project_number}/locations/{location_id}/activeDirectories/{activ +// e_directory_id}`. +func (r *ProjectsLocationsActiveDirectoriesService) Patch(name string, activedirectory *ActiveDirectory) *ProjectsLocationsActiveDirectoriesPatchCall { + c := &ProjectsLocationsActiveDirectoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.activedirectory = activedirectory + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Active Directory +// 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 *ProjectsLocationsActiveDirectoriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsActiveDirectoriesPatchCall { + 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 +// details. +func (c *ProjectsLocationsActiveDirectoriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesPatchCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.activedirectory) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.activeDirectories.patch" call. +// 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 *ProjectsLocationsActiveDirectoriesPatchCall) 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 +} + +type ProjectsLocationsBackupPoliciesCreateCall struct { + s *Service + parent string + backuppolicy *BackupPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates new backup policy +// +// - parent: The location to create the backup policies of, in the format +// `projects/{project_id}/locations/{location}`. +func (r *ProjectsLocationsBackupPoliciesService) Create(parent string, backuppolicy *BackupPolicy) *ProjectsLocationsBackupPoliciesCreateCall { + c := &ProjectsLocationsBackupPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backuppolicy = backuppolicy + return c +} + +// BackupPolicyId sets the optional parameter "backupPolicyId": Required. The +// ID to use for the backup policy. The ID must be unique within the specified +// location. Must contain only letters, numbers and hyphen, with the first +// character a letter, the last a letter or a number, and a 63 character +// maximum. +func (c *ProjectsLocationsBackupPoliciesCreateCall) BackupPolicyId(backupPolicyId string) *ProjectsLocationsBackupPoliciesCreateCall { + c.urlParams_.Set("backupPolicyId", backupPolicyId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuppolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupPolicies") + 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 "netapp.projects.locations.backupPolicies.create" call. +// 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 *ProjectsLocationsBackupPoliciesCreateCall) 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 +} + +type ProjectsLocationsBackupPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the backup policy. +// +// - name: The backup policy resource name, in the format +// `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_i +// d}`. +func (r *ProjectsLocationsBackupPoliciesService) Delete(name string) *ProjectsLocationsBackupPoliciesDeleteCall { + c := &ProjectsLocationsBackupPoliciesDeleteCall{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 +// details. +func (c *ProjectsLocationsBackupPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.backupPolicies.delete" call. +// 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 *ProjectsLocationsBackupPoliciesDeleteCall) 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 +} + +type ProjectsLocationsBackupPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified backup policy by +// backup_policy_id. +// +// - name: The backupPolicy resource name, in the format +// `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_i +// d}`. +func (r *ProjectsLocationsBackupPoliciesService) Get(name string) *ProjectsLocationsBackupPoliciesGetCall { + c := &ProjectsLocationsBackupPoliciesGetCall{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 +// details. +func (c *ProjectsLocationsBackupPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.backupPolicies.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackupPolicy.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 *ProjectsLocationsBackupPoliciesGetCall) Do(opts ...googleapi.CallOption) (*BackupPolicy, 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 := &BackupPolicy{ + 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 +} + +type ProjectsLocationsBackupPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns list of all available backup policies. +// +// - parent: Parent value for ListBackupPoliciesRequest. +func (r *ProjectsLocationsBackupPoliciesService) List(parent string) *ProjectsLocationsBackupPoliciesListCall { + c := &ProjectsLocationsBackupPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsBackupPoliciesListCall) Filter(filter string) *ProjectsLocationsBackupPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsBackupPoliciesListCall) OrderBy(orderBy string) *ProjectsLocationsBackupPoliciesListCall { + 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, the server will pick +// an appropriate default. +func (c *ProjectsLocationsBackupPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsBackupPoliciesListCall { + 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 *ProjectsLocationsBackupPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsBackupPoliciesListCall { + 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 +// details. +func (c *ProjectsLocationsBackupPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/backupPolicies") + 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 "netapp.projects.locations.backupPolicies.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupPoliciesResponse.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 *ProjectsLocationsBackupPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListBackupPoliciesResponse, 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 := &ListBackupPoliciesResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupPoliciesListCall) Pages(ctx context.Context, f func(*ListBackupPoliciesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsBackupPoliciesPatchCall struct { + s *Service + name string + backuppolicy *BackupPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates settings of a specific backup policy. +// +// - name: Identifier. The resource name of the backup policy. Format: +// `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_i +// d}`. +func (r *ProjectsLocationsBackupPoliciesService) Patch(name string, backuppolicy *BackupPolicy) *ProjectsLocationsBackupPoliciesPatchCall { + c := &ProjectsLocationsBackupPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backuppolicy = backuppolicy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Backup Policy 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 *ProjectsLocationsBackupPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupPoliciesPatchCall { + 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 +// details. +func (c *ProjectsLocationsBackupPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuppolicy) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.backupPolicies.patch" call. +// 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 *ProjectsLocationsBackupPoliciesPatchCall) 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 +} + +type ProjectsLocationsBackupVaultsCreateCall struct { + s *Service + parent string + backupvault *BackupVault + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates new backup vault +// +// - parent: The location to create the backup vaults, in the format +// `projects/{project_id}/locations/{location}`. +func (r *ProjectsLocationsBackupVaultsService) Create(parent string, backupvault *BackupVault) *ProjectsLocationsBackupVaultsCreateCall { + c := &ProjectsLocationsBackupVaultsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backupvault = backupvault + return c +} + +// BackupVaultId sets the optional parameter "backupVaultId": Required. The ID +// to use for the backupVault. The ID must be unique within the specified +// location. Must contain only letters, numbers and hyphen, with the first +// character a letter, the last a letter or a number, and a 63 character +// maximum. +func (c *ProjectsLocationsBackupVaultsCreateCall) BackupVaultId(backupVaultId string) *ProjectsLocationsBackupVaultsCreateCall { + c.urlParams_.Set("backupVaultId", backupVaultId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupVaultsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backupvault) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupVaults") + 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 "netapp.projects.locations.backupVaults.create" call. +// 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 *ProjectsLocationsBackupVaultsCreateCall) 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 +} + +type ProjectsLocationsBackupVaultsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the backup vault. +// +// - name: The backupVault resource name, in the format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. +func (r *ProjectsLocationsBackupVaultsService) Delete(name string) *ProjectsLocationsBackupVaultsDeleteCall { + c := &ProjectsLocationsBackupVaultsDeleteCall{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 +// details. +func (c *ProjectsLocationsBackupVaultsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.backupVaults.delete" call. +// 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 *ProjectsLocationsBackupVaultsDeleteCall) 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 +} + +type ProjectsLocationsBackupVaultsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified backup vault +// +// - name: The backupVault resource name, in the format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. +func (r *ProjectsLocationsBackupVaultsService) Get(name string) *ProjectsLocationsBackupVaultsGetCall { + c := &ProjectsLocationsBackupVaultsGetCall{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 +// details. +func (c *ProjectsLocationsBackupVaultsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupVaultsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupVaultsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.backupVaults.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackupVault.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 *ProjectsLocationsBackupVaultsGetCall) Do(opts ...googleapi.CallOption) (*BackupVault, 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 := &BackupVault{ + 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 +} + +type ProjectsLocationsBackupVaultsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns list of all available backup vaults. +// +// - parent: The location for which to retrieve backupVault information, in the +// format `projects/{project_id}/locations/{location}`. +func (r *ProjectsLocationsBackupVaultsService) List(parent string) *ProjectsLocationsBackupVaultsListCall { + c := &ProjectsLocationsBackupVaultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsBackupVaultsListCall) Filter(filter string) *ProjectsLocationsBackupVaultsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsBackupVaultsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupVaultsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsBackupVaultsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupVaultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsBackupVaultsListCall) PageToken(pageToken string) *ProjectsLocationsBackupVaultsListCall { + 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 +// details. +func (c *ProjectsLocationsBackupVaultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupVaultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupVaultsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsListCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/backupVaults") + 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 "netapp.projects.locations.backupVaults.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupVaultsResponse.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 *ProjectsLocationsBackupVaultsListCall) Do(opts ...googleapi.CallOption) (*ListBackupVaultsResponse, 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 := &ListBackupVaultsResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupVaultsListCall) Pages(ctx context.Context, f func(*ListBackupVaultsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsBackupVaultsPatchCall struct { + s *Service + name string + backupvault *BackupVault + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the settings of a specific backup vault. +// +// - name: Identifier. The resource name of the backup vault. Format: +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` +// . +func (r *ProjectsLocationsBackupVaultsService) Patch(name string, backupvault *BackupVault) *ProjectsLocationsBackupVaultsPatchCall { + c := &ProjectsLocationsBackupVaultsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backupvault = backupvault + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Backup resource to be +// updated. 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 *ProjectsLocationsBackupVaultsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupVaultsPatchCall { + 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 +// details. +func (c *ProjectsLocationsBackupVaultsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backupvault) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.backupVaults.patch" call. +// 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 *ProjectsLocationsBackupVaultsPatchCall) 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 +} + +type ProjectsLocationsBackupVaultsBackupsCreateCall struct { + s *Service + parent string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a backup from the volume specified in the request The backup +// can be created from the given snapshot if specified in the request. If no +// snapshot specified, there'll be a new snapshot taken to initiate the backup +// creation. +// +// - parent: The NetApp backupVault to create the backups of, in the format +// `projects/*/locations/*/backupVaults/{backup_vault_id}`. +func (r *ProjectsLocationsBackupVaultsBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsBackupVaultsBackupsCreateCall { + c := &ProjectsLocationsBackupVaultsBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backup = backup + return c +} + +// BackupId sets the optional parameter "backupId": Required. The ID to use for +// the backup. The ID must be unique within the specified backupVault. Must +// contain only letters, numbers and hyphen, with the first character a letter, +// the last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsBackupVaultsBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups") + 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 "netapp.projects.locations.backupVaults.backups.create" call. +// 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 *ProjectsLocationsBackupVaultsBackupsCreateCall) 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 +} + +type ProjectsLocationsBackupVaultsBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the backup. +// +// - name: The backup resource name, in the format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/ +// backups/{backup_id}`. +func (r *ProjectsLocationsBackupVaultsBackupsService) Delete(name string) *ProjectsLocationsBackupVaultsBackupsDeleteCall { + c := &ProjectsLocationsBackupVaultsBackupsDeleteCall{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 +// details. +func (c *ProjectsLocationsBackupVaultsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.backupVaults.backups.delete" call. +// 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 *ProjectsLocationsBackupVaultsBackupsDeleteCall) 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 +} + +type ProjectsLocationsBackupVaultsBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified backup +// +// - name: The backup resource name, in the format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/ +// backups/{backup_id}`. +func (r *ProjectsLocationsBackupVaultsBackupsService) Get(name string) *ProjectsLocationsBackupVaultsBackupsGetCall { + c := &ProjectsLocationsBackupVaultsBackupsGetCall{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 +// details. +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupVaultsBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.backupVaults.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Backup.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 *ProjectsLocationsBackupVaultsBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, 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 := &Backup{ + 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 +} + +type ProjectsLocationsBackupVaultsBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all backups for a backupVault. +// +// - parent: The backupVault for which to retrieve backup information, in the +// format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` +// . To retrieve backup information for all locations, use "-" for the +// `{location}` value. To retrieve backup information for all backupVaults, +// use "-" for the `{backup_vault_id}` value. To retrieve backup information +// for a volume, use "-" for the `{backup_vault_id}` value and specify volume +// full name with the filter. +func (r *ProjectsLocationsBackupVaultsBackupsService) List(parent string) *ProjectsLocationsBackupVaultsBackupsListCall { + c := &ProjectsLocationsBackupVaultsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. If +// specified, backups will be returned based on the attribute name that matches +// the filter expression. If empty, then no backups are filtered out. See +// https://google.aip.dev/160 +func (c *ProjectsLocationsBackupVaultsBackupsListCall) Filter(filter string) *ProjectsLocationsBackupVaultsBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsBackupVaultsBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupVaultsBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. The service may return fewer than this value. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupVaultsBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupVaultsBackupsListCall { + 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 +// details. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupVaultsBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/backups") + 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 "netapp.projects.locations.backupVaults.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupsResponse.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 *ProjectsLocationsBackupVaultsBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, 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 := &ListBackupsResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupVaultsBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsBackupVaultsBackupsPatchCall struct { + s *Service + name string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update backup with full spec. +// +// - name: Identifier. The resource name of the backup. Format: +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/ +// backups/{backup_id}`. +func (r *ProjectsLocationsBackupVaultsBackupsService) Patch(name string, backup *Backup) *ProjectsLocationsBackupVaultsBackupsPatchCall { + c := &ProjectsLocationsBackupVaultsBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backup = backup + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Backup resource to be +// updated. 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 *ProjectsLocationsBackupVaultsBackupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupVaultsBackupsPatchCall { + 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 +// details. +func (c *ProjectsLocationsBackupVaultsBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.backupVaults.backups.patch" call. +// 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 *ProjectsLocationsBackupVaultsBackupsPatchCall) 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 +} + +type ProjectsLocationsKmsConfigsCreateCall struct { + s *Service + parent string + kmsconfig *KmsConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new KMS config. +// +// - parent: Value for parent. +func (r *ProjectsLocationsKmsConfigsService) Create(parent string, kmsconfig *KmsConfig) *ProjectsLocationsKmsConfigsCreateCall { + c := &ProjectsLocationsKmsConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.kmsconfig = kmsconfig + return c +} + +// KmsConfigId sets the optional parameter "kmsConfigId": Required. Id of the +// requesting KmsConfig. Must be unique within the parent resource. Must +// contain only letters, numbers and hyphen, with the first character a letter, +// the last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsKmsConfigsCreateCall) KmsConfigId(kmsConfigId string) *ProjectsLocationsKmsConfigsCreateCall { + c.urlParams_.Set("kmsConfigId", kmsConfigId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsKmsConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.kmsconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/kmsConfigs") + 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 "netapp.projects.locations.kmsConfigs.create" call. +// 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 *ProjectsLocationsKmsConfigsCreateCall) 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 +} + +type ProjectsLocationsKmsConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the Kms config. +// +// - name: Name of the KmsConfig. +func (r *ProjectsLocationsKmsConfigsService) Delete(name string) *ProjectsLocationsKmsConfigsDeleteCall { + c := &ProjectsLocationsKmsConfigsDeleteCall{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 +// details. +func (c *ProjectsLocationsKmsConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.kmsConfigs.delete" call. +// 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 *ProjectsLocationsKmsConfigsDeleteCall) 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 +} + +type ProjectsLocationsKmsConfigsEncryptCall struct { + s *Service + name string + encryptvolumesrequest *EncryptVolumesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Encrypt: Encrypt the existing volumes without CMEK encryption with the +// desired the KMS config for the whole region. +// +// - name: Name of the KmsConfig. +func (r *ProjectsLocationsKmsConfigsService) Encrypt(name string, encryptvolumesrequest *EncryptVolumesRequest) *ProjectsLocationsKmsConfigsEncryptCall { + c := &ProjectsLocationsKmsConfigsEncryptCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.encryptvolumesrequest = encryptvolumesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsKmsConfigsEncryptCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsEncryptCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsEncryptCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsEncryptCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsEncryptCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsEncryptCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.encryptvolumesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:encrypt") + 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 "netapp.projects.locations.kmsConfigs.encrypt" call. +// 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 *ProjectsLocationsKmsConfigsEncryptCall) 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 +} + +type ProjectsLocationsKmsConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified KMS config by kms_config_id. +// +// - name: Name of the KmsConfig. +func (r *ProjectsLocationsKmsConfigsService) Get(name string) *ProjectsLocationsKmsConfigsGetCall { + c := &ProjectsLocationsKmsConfigsGetCall{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 +// details. +func (c *ProjectsLocationsKmsConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsKmsConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsKmsConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.kmsConfigs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *KmsConfig.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 *ProjectsLocationsKmsConfigsGetCall) Do(opts ...googleapi.CallOption) (*KmsConfig, 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 := &KmsConfig{ + 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 +} + +type ProjectsLocationsKmsConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all KMS configs owned by the caller. +// +// - parent: Parent value. +func (r *ProjectsLocationsKmsConfigsService) List(parent string) *ProjectsLocationsKmsConfigsListCall { + c := &ProjectsLocationsKmsConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsKmsConfigsListCall) Filter(filter string) *ProjectsLocationsKmsConfigsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsKmsConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsKmsConfigsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsKmsConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsKmsConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsKmsConfigsListCall) PageToken(pageToken string) *ProjectsLocationsKmsConfigsListCall { + 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 +// details. +func (c *ProjectsLocationsKmsConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsKmsConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsKmsConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsListCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/kmsConfigs") + 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 "netapp.projects.locations.kmsConfigs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListKmsConfigsResponse.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 *ProjectsLocationsKmsConfigsListCall) Do(opts ...googleapi.CallOption) (*ListKmsConfigsResponse, 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 := &ListKmsConfigsResponse{ + 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 +} + +// 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 *ProjectsLocationsKmsConfigsListCall) Pages(ctx context.Context, f func(*ListKmsConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsKmsConfigsPatchCall struct { + s *Service + name string + kmsconfig *KmsConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the Kms config properties with the full spec +// +// - name: Identifier. Name of the KmsConfig. +func (r *ProjectsLocationsKmsConfigsService) Patch(name string, kmsconfig *KmsConfig) *ProjectsLocationsKmsConfigsPatchCall { + c := &ProjectsLocationsKmsConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.kmsconfig = kmsconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the KmsConfig 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 *ProjectsLocationsKmsConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsKmsConfigsPatchCall { + 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 +// details. +func (c *ProjectsLocationsKmsConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.kmsconfig) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.kmsConfigs.patch" call. +// 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 *ProjectsLocationsKmsConfigsPatchCall) 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 +} + +type ProjectsLocationsKmsConfigsVerifyCall struct { + s *Service + name string + verifykmsconfigrequest *VerifyKmsConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Verify: Verifies KMS config reachability. +// +// - name: Name of the KMS Config to be verified. +func (r *ProjectsLocationsKmsConfigsService) Verify(name string, verifykmsconfigrequest *VerifyKmsConfigRequest) *ProjectsLocationsKmsConfigsVerifyCall { + c := &ProjectsLocationsKmsConfigsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.verifykmsconfigrequest = verifykmsconfigrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsKmsConfigsVerifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsVerifyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsVerifyCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsVerifyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsVerifyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsVerifyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.verifykmsconfigrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:verify") + 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 "netapp.projects.locations.kmsConfigs.verify" call. +// Any non-2xx status code is an error. Response headers are in either +// *VerifyKmsConfigResponse.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 *ProjectsLocationsKmsConfigsVerifyCall) Do(opts ...googleapi.CallOption) (*VerifyKmsConfigResponse, 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 := &VerifyKmsConfigResponse{ + 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 +} + +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 +// details. +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. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 +} + +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 +// details. +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. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.operations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 +} + +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 +// details. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.operations.get" call. +// 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 +} + +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 +// details. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.operations.list" call. +// 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 +} + +// 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")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsStoragePoolsCreateCall struct { + s *Service + parent string + storagepool *StoragePool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new storage pool. +// +// - parent: Value for parent. +func (r *ProjectsLocationsStoragePoolsService) Create(parent string, storagepool *StoragePool) *ProjectsLocationsStoragePoolsCreateCall { + c := &ProjectsLocationsStoragePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.storagepool = storagepool + return c +} + +// StoragePoolId sets the optional parameter "storagePoolId": Required. Id of +// the requesting storage pool. Must be unique within the parent resource. Must +// contain only letters, numbers and hyphen, with the first character a letter, +// the last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsStoragePoolsCreateCall) StoragePoolId(storagePoolId string) *ProjectsLocationsStoragePoolsCreateCall { + c.urlParams_.Set("storagePoolId", storagePoolId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsStoragePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.storagepool) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/storagePools") + 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 "netapp.projects.locations.storagePools.create" call. +// 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 *ProjectsLocationsStoragePoolsCreateCall) 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 +} + +type ProjectsLocationsStoragePoolsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the storage pool. +// +// - name: Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) Delete(name string) *ProjectsLocationsStoragePoolsDeleteCall { + c := &ProjectsLocationsStoragePoolsDeleteCall{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 +// details. +func (c *ProjectsLocationsStoragePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.storagePools.delete" call. +// 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 *ProjectsLocationsStoragePoolsDeleteCall) 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 +} + +type ProjectsLocationsStoragePoolsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified storage pool by poolId. +// +// - name: Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) Get(name string) *ProjectsLocationsStoragePoolsGetCall { + c := &ProjectsLocationsStoragePoolsGetCall{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 +// details. +func (c *ProjectsLocationsStoragePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsStoragePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoragePoolsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.storagePools.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *StoragePool.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 *ProjectsLocationsStoragePoolsGetCall) Do(opts ...googleapi.CallOption) (*StoragePool, 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 := &StoragePool{ + 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 +} + +type ProjectsLocationsStoragePoolsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all storage pools owned by the caller. +// +// - parent: Parent value. +func (r *ProjectsLocationsStoragePoolsService) List(parent string) *ProjectsLocationsStoragePoolsListCall { + c := &ProjectsLocationsStoragePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsStoragePoolsListCall) Filter(filter string) *ProjectsLocationsStoragePoolsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsStoragePoolsListCall) OrderBy(orderBy string) *ProjectsLocationsStoragePoolsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsStoragePoolsListCall) PageSize(pageSize int64) *ProjectsLocationsStoragePoolsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsStoragePoolsListCall) PageToken(pageToken string) *ProjectsLocationsStoragePoolsListCall { + 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 +// details. +func (c *ProjectsLocationsStoragePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsStoragePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoragePoolsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsListCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/storagePools") + 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 "netapp.projects.locations.storagePools.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListStoragePoolsResponse.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 *ProjectsLocationsStoragePoolsListCall) Do(opts ...googleapi.CallOption) (*ListStoragePoolsResponse, 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 := &ListStoragePoolsResponse{ + 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 +} + +// 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 *ProjectsLocationsStoragePoolsListCall) Pages(ctx context.Context, f func(*ListStoragePoolsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsStoragePoolsPatchCall struct { + s *Service + name string + storagepool *StoragePool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the storage pool properties with the full spec +// +// - name: Identifier. Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) Patch(name string, storagepool *StoragePool) *ProjectsLocationsStoragePoolsPatchCall { + c := &ProjectsLocationsStoragePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.storagepool = storagepool + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the StoragePool 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 *ProjectsLocationsStoragePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsStoragePoolsPatchCall { + 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 +// details. +func (c *ProjectsLocationsStoragePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.storagepool) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.storagePools.patch" call. +// 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 *ProjectsLocationsStoragePoolsPatchCall) 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 +} + +type ProjectsLocationsStoragePoolsSwitchCall struct { + s *Service + name string + switchactivereplicazonerequest *SwitchActiveReplicaZoneRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Switch: This operation will switch the active/replica zone for a regional +// storagePool. +// +// - name: Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) Switch(name string, switchactivereplicazonerequest *SwitchActiveReplicaZoneRequest) *ProjectsLocationsStoragePoolsSwitchCall { + c := &ProjectsLocationsStoragePoolsSwitchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.switchactivereplicazonerequest = switchactivereplicazonerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsStoragePoolsSwitchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsSwitchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsSwitchCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsSwitchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsSwitchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsSwitchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.switchactivereplicazonerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:switch") + 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 "netapp.projects.locations.storagePools.switch" call. +// 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 *ProjectsLocationsStoragePoolsSwitchCall) 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 +} + +type ProjectsLocationsVolumesCreateCall struct { + s *Service + parent string + volume *Volume + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Volume in a given project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsVolumesService) Create(parent string, volume *Volume) *ProjectsLocationsVolumesCreateCall { + c := &ProjectsLocationsVolumesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.volume = volume + return c +} + +// VolumeId sets the optional parameter "volumeId": Required. Id of the +// requesting volume. Must be unique within the parent resource. Must contain +// only letters, numbers and hyphen, with the first character a letter, the +// last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsVolumesCreateCall) VolumeId(volumeId string) *ProjectsLocationsVolumesCreateCall { + c.urlParams_.Set("volumeId", volumeId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.volume) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/volumes") + 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 "netapp.projects.locations.volumes.create" call. +// 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 *ProjectsLocationsVolumesCreateCall) 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 +} + +type ProjectsLocationsVolumesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Volume. +// +// - name: Name of the volume. +func (r *ProjectsLocationsVolumesService) Delete(name string) *ProjectsLocationsVolumesDeleteCall { + c := &ProjectsLocationsVolumesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If this field is set as true, +// CCFE will not block the volume resource deletion even if it has any +// snapshots resource. (Otherwise, the request will only work if the volume has +// no snapshots.) +func (c *ProjectsLocationsVolumesDeleteCall) Force(force bool) *ProjectsLocationsVolumesDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.volumes.delete" call. +// 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 *ProjectsLocationsVolumesDeleteCall) 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 +} + +type ProjectsLocationsVolumesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Volume. +// +// - name: Name of the volume. +func (r *ProjectsLocationsVolumesService) Get(name string) *ProjectsLocationsVolumesGetCall { + c := &ProjectsLocationsVolumesGetCall{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 +// details. +func (c *ProjectsLocationsVolumesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.volumes.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Volume.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 *ProjectsLocationsVolumesGetCall) Do(opts ...googleapi.CallOption) (*Volume, 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 := &Volume{ + 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 +} + +type ProjectsLocationsVolumesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Volumes in a given project. +// +// - parent: Parent value for ListVolumesRequest. +func (r *ProjectsLocationsVolumesService) List(parent string) *ProjectsLocationsVolumesListCall { + c := &ProjectsLocationsVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsVolumesListCall) Filter(filter string) *ProjectsLocationsVolumesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsVolumesListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesListCall { + 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, the server will pick +// an appropriate default. +func (c *ProjectsLocationsVolumesListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesListCall { + 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 *ProjectsLocationsVolumesListCall) PageToken(pageToken string) *ProjectsLocationsVolumesListCall { + 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 +// details. +func (c *ProjectsLocationsVolumesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesListCall) Context(ctx context.Context) *ProjectsLocationsVolumesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/volumes") + 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 "netapp.projects.locations.volumes.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListVolumesResponse.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 *ProjectsLocationsVolumesListCall) Do(opts ...googleapi.CallOption) (*ListVolumesResponse, 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 := &ListVolumesResponse{ + 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 +} + +// 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 *ProjectsLocationsVolumesListCall) Pages(ctx context.Context, f func(*ListVolumesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsVolumesPatchCall struct { + s *Service + name string + volume *Volume + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Volume. +// +// - name: Identifier. Name of the volume. +func (r *ProjectsLocationsVolumesService) Patch(name string, volume *Volume) *ProjectsLocationsVolumesPatchCall { + c := &ProjectsLocationsVolumesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.volume = volume + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Volume 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 *ProjectsLocationsVolumesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesPatchCall { + 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 +// details. +func (c *ProjectsLocationsVolumesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.volume) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.volumes.patch" call. +// 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 *ProjectsLocationsVolumesPatchCall) 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 +} + +type ProjectsLocationsVolumesRevertCall struct { + s *Service + name string + revertvolumerequest *RevertVolumeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Revert: Revert an existing volume to a specified snapshot. Warning! This +// operation will permanently revert all changes made after the snapshot was +// created. +// +// - name: The resource name of the volume, in the format of +// projects/{project_id}/locations/{location}/volumes/{volume_id}. +func (r *ProjectsLocationsVolumesService) Revert(name string, revertvolumerequest *RevertVolumeRequest) *ProjectsLocationsVolumesRevertCall { + c := &ProjectsLocationsVolumesRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.revertvolumerequest = revertvolumerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesRevertCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesRevertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesRevertCall) Context(ctx context.Context) *ProjectsLocationsVolumesRevertCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesRevertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesRevertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.revertvolumerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:revert") + 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 "netapp.projects.locations.volumes.revert" call. +// 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 *ProjectsLocationsVolumesRevertCall) 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 +} + +type ProjectsLocationsVolumesReplicationsCreateCall struct { + s *Service + parent string + replication *Replication + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a new replication for a volume. +// +// - parent: The NetApp volume to create the replications of, in the format +// `projects/{project_id}/locations/{location}/volumes/{volume_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) Create(parent string, replication *Replication) *ProjectsLocationsVolumesReplicationsCreateCall { + c := &ProjectsLocationsVolumesReplicationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.replication = replication + return c +} + +// ReplicationId sets the optional parameter "replicationId": Required. ID of +// the replication to create. Must be unique within the parent resource. Must +// contain only letters, numbers and hyphen, with the first character a letter, +// the last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsVolumesReplicationsCreateCall) ReplicationId(replicationId string) *ProjectsLocationsVolumesReplicationsCreateCall { + c.urlParams_.Set("replicationId", replicationId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesReplicationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.replication) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replications") + 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 "netapp.projects.locations.volumes.replications.create" call. +// 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 *ProjectsLocationsVolumesReplicationsCreateCall) 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 +} + +type ProjectsLocationsVolumesReplicationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a replication. +// +// - name: The replication resource name, in the format +// `projects/*/locations/*/volumes/*/replications/{replication_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) Delete(name string) *ProjectsLocationsVolumesReplicationsDeleteCall { + c := &ProjectsLocationsVolumesReplicationsDeleteCall{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 +// details. +func (c *ProjectsLocationsVolumesReplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.volumes.replications.delete" call. +// 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 *ProjectsLocationsVolumesReplicationsDeleteCall) 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 +} + +type ProjectsLocationsVolumesReplicationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describe a replication for a volume. +// +// - name: The replication resource name, in the format +// `projects/{project_id}/locations/{location}/volumes/{volume_id}/replication +// s/{replication_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) Get(name string) *ProjectsLocationsVolumesReplicationsGetCall { + c := &ProjectsLocationsVolumesReplicationsGetCall{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 +// details. +func (c *ProjectsLocationsVolumesReplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesReplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesReplicationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.volumes.replications.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Replication.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 *ProjectsLocationsVolumesReplicationsGetCall) Do(opts ...googleapi.CallOption) (*Replication, 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 := &Replication{ + 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 +} + +type ProjectsLocationsVolumesReplicationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all replications for a volume. +// +// - parent: The volume for which to retrieve replication information, in the +// format `projects/{project_id}/locations/{location}/volumes/{volume_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) List(parent string) *ProjectsLocationsVolumesReplicationsListCall { + c := &ProjectsLocationsVolumesReplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsVolumesReplicationsListCall) Filter(filter string) *ProjectsLocationsVolumesReplicationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsVolumesReplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesReplicationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsVolumesReplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesReplicationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsVolumesReplicationsListCall) PageToken(pageToken string) *ProjectsLocationsVolumesReplicationsListCall { + 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 +// details. +func (c *ProjectsLocationsVolumesReplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesReplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesReplicationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsListCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/replications") + 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 "netapp.projects.locations.volumes.replications.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListReplicationsResponse.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 *ProjectsLocationsVolumesReplicationsListCall) Do(opts ...googleapi.CallOption) (*ListReplicationsResponse, 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 := &ListReplicationsResponse{ + 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 +} + +// 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 *ProjectsLocationsVolumesReplicationsListCall) Pages(ctx context.Context, f func(*ListReplicationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsVolumesReplicationsPatchCall struct { + s *Service + name string + replication *Replication + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the settings of a specific replication. +// +// - name: Identifier. The resource name of the Replication. Format: +// `projects/{project_id}/locations/{location}/volumes/{volume_id}/replication +// s/{replication_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) Patch(name string, replication *Replication) *ProjectsLocationsVolumesReplicationsPatchCall { + c := &ProjectsLocationsVolumesReplicationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.replication = replication + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. At least one path must be supplied in this field. +func (c *ProjectsLocationsVolumesReplicationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesReplicationsPatchCall { + 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 +// details. +func (c *ProjectsLocationsVolumesReplicationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.replication) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.volumes.replications.patch" call. +// 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 *ProjectsLocationsVolumesReplicationsPatchCall) 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 +} + +type ProjectsLocationsVolumesReplicationsResumeCall struct { + s *Service + name string + resumereplicationrequest *ResumeReplicationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resume: Resume Cross Region Replication. +// +// - name: The resource name of the replication, in the format of +// projects/{project_id}/locations/{location}/volumes/{volume_id}/replications +// /{replication_id}. +func (r *ProjectsLocationsVolumesReplicationsService) Resume(name string, resumereplicationrequest *ResumeReplicationRequest) *ProjectsLocationsVolumesReplicationsResumeCall { + c := &ProjectsLocationsVolumesReplicationsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.resumereplicationrequest = resumereplicationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesReplicationsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsResumeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsResumeCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsResumeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsResumeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsResumeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumereplicationrequest) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.volumes.replications.resume" call. +// 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 *ProjectsLocationsVolumesReplicationsResumeCall) 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 +} + +type ProjectsLocationsVolumesReplicationsReverseDirectionCall struct { + s *Service + name string + reversereplicationdirectionrequest *ReverseReplicationDirectionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ReverseDirection: Reverses direction of replication. Source becomes +// destination and destination becomes source. +// +// - name: The resource name of the replication, in the format of +// projects/{project_id}/locations/{location}/volumes/{volume_id}/replications +// /{replication_id}. +func (r *ProjectsLocationsVolumesReplicationsService) ReverseDirection(name string, reversereplicationdirectionrequest *ReverseReplicationDirectionRequest) *ProjectsLocationsVolumesReplicationsReverseDirectionCall { + c := &ProjectsLocationsVolumesReplicationsReverseDirectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.reversereplicationdirectionrequest = reversereplicationdirectionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesReplicationsReverseDirectionCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsReverseDirectionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsReverseDirectionCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsReverseDirectionCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsReverseDirectionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsReverseDirectionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reversereplicationdirectionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reverseDirection") + 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 "netapp.projects.locations.volumes.replications.reverseDirection" call. +// 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 *ProjectsLocationsVolumesReplicationsReverseDirectionCall) 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 +} + +type ProjectsLocationsVolumesReplicationsStopCall struct { + s *Service + name string + stopreplicationrequest *StopReplicationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stop Cross Region Replication. +// +// - name: The resource name of the replication, in the format of +// projects/{project_id}/locations/{location}/volumes/{volume_id}/replications +// /{replication_id}. +func (r *ProjectsLocationsVolumesReplicationsService) Stop(name string, stopreplicationrequest *StopReplicationRequest) *ProjectsLocationsVolumesReplicationsStopCall { + c := &ProjectsLocationsVolumesReplicationsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.stopreplicationrequest = stopreplicationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesReplicationsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsStopCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsStopCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsStopCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsStopCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopreplicationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop") + 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 "netapp.projects.locations.volumes.replications.stop" call. +// 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 *ProjectsLocationsVolumesReplicationsStopCall) 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 +} + +type ProjectsLocationsVolumesSnapshotsCreateCall struct { + s *Service + parent string + snapshot *Snapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a new snapshot for a volume. +// +// - parent: The NetApp volume to create the snapshots of, in the format +// `projects/{project_id}/locations/{location}/volumes/{volume_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) Create(parent string, snapshot *Snapshot) *ProjectsLocationsVolumesSnapshotsCreateCall { + c := &ProjectsLocationsVolumesSnapshotsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.snapshot = snapshot + return c +} + +// SnapshotId sets the optional parameter "snapshotId": Required. ID of the +// snapshot to create. Must be unique within the parent resource. Must contain +// only letters, numbers and hyphen, with the first character a letter, the +// last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) SnapshotId(snapshotId string) *ProjectsLocationsVolumesSnapshotsCreateCall { + c.urlParams_.Set("snapshotId", snapshotId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/snapshots") + 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 "netapp.projects.locations.volumes.snapshots.create" call. +// 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 *ProjectsLocationsVolumesSnapshotsCreateCall) 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 +} + +type ProjectsLocationsVolumesSnapshotsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a snapshot. +// +// - name: The snapshot resource name, in the format +// `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) Delete(name string) *ProjectsLocationsVolumesSnapshotsDeleteCall { + c := &ProjectsLocationsVolumesSnapshotsDeleteCall{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 +// details. +func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.volumes.snapshots.delete" call. +// 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 *ProjectsLocationsVolumesSnapshotsDeleteCall) 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 +} + +type ProjectsLocationsVolumesSnapshotsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describe a snapshot for a volume. +// +// - name: The snapshot resource name, in the format +// `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{ +// snapshot_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) Get(name string) *ProjectsLocationsVolumesSnapshotsGetCall { + c := &ProjectsLocationsVolumesSnapshotsGetCall{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 +// details. +func (c *ProjectsLocationsVolumesSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesSnapshotsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "netapp.projects.locations.volumes.snapshots.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Snapshot.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 *ProjectsLocationsVolumesSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, 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 := &Snapshot{ + 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 +} + +type ProjectsLocationsVolumesSnapshotsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all snapshots for a volume. +// +// - parent: The volume for which to retrieve snapshot information, in the +// format `projects/{project_id}/locations/{location}/volumes/{volume_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) List(parent string) *ProjectsLocationsVolumesSnapshotsListCall { + c := &ProjectsLocationsVolumesSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsVolumesSnapshotsListCall) Filter(filter string) *ProjectsLocationsVolumesSnapshotsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsVolumesSnapshotsListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesSnapshotsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsVolumesSnapshotsListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesSnapshotsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsVolumesSnapshotsListCall) PageToken(pageToken string) *ProjectsLocationsVolumesSnapshotsListCall { + 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 +// details. +func (c *ProjectsLocationsVolumesSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesSnapshotsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsListCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/snapshots") + 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 "netapp.projects.locations.volumes.snapshots.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListSnapshotsResponse.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 *ProjectsLocationsVolumesSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotsResponse, 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 := &ListSnapshotsResponse{ + 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 +} + +// 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 *ProjectsLocationsVolumesSnapshotsListCall) Pages(ctx context.Context, f func(*ListSnapshotsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsVolumesSnapshotsPatchCall struct { + s *Service + name string + snapshot *Snapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the settings of a specific snapshot. +// +// - name: Identifier. The resource name of the snapshot. Format: +// `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{ +// snapshot_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) Patch(name string, snapshot *Snapshot) *ProjectsLocationsVolumesSnapshotsPatchCall { + c := &ProjectsLocationsVolumesSnapshotsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.snapshot = snapshot + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. At least one path must be supplied in this field. +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesSnapshotsPatchCall { + 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 +// details. +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.volumes.snapshots.patch" call. +// 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 *ProjectsLocationsVolumesSnapshotsPatchCall) 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 +} diff --git a/netapp/v1beta1/netapp-api.json b/netapp/v1beta1/netapp-api.json new file mode 100644 index 00000000000..1a048b1b959 --- /dev/null +++ b/netapp/v1beta1/netapp-api.json @@ -0,0 +1,4340 @@ +{ + "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://netapp.googleapis.com/", + "batchPath": "batch", + "canonicalName": "NetApp Files", + "description": "Google Cloud NetApp Volumes is a fully-managed, cloud-based data storage service that provides advanced data management capabilities and highly scalable performance with global availability.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/netapp/", + "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": "netapp:v1beta1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://netapp.mtls.googleapis.com/", + "name": "netapp", + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1beta1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "netapp.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": "v1beta1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "activeDirectories": { + "methods": { + "create": { + "description": "CreateActiveDirectory Creates the active directory specified in the request.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/activeDirectories", + "httpMethod": "POST", + "id": "netapp.projects.locations.activeDirectories.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "activeDirectoryId": { + "description": "Required. ID of the active directory to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter , the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/activeDirectories", + "request": { + "$ref": "ActiveDirectory" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete the active directory specified in the request.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/activeDirectories/{activeDirectoriesId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.activeDirectories.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the active directory.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/activeDirectories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Describes a specified active directory.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/activeDirectories/{activeDirectoriesId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.activeDirectories.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the active directory.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/activeDirectories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "ActiveDirectory" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists active directories.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/activeDirectories", + "httpMethod": "GET", + "id": "netapp.projects.locations.activeDirectories.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, the 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 ListActiveDirectoriesRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/activeDirectories", + "response": { + "$ref": "ListActiveDirectoriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update the parameters of an active directories.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/activeDirectories/{activeDirectoriesId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.activeDirectories.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/activeDirectories/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Active Directory 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": "v1beta1/{+name}", + "request": { + "$ref": "ActiveDirectory" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "backupPolicies": { + "methods": { + "create": { + "description": "Creates new backup policy", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupPolicies", + "httpMethod": "POST", + "id": "netapp.projects.locations.backupPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupPolicyId": { + "description": "Required. The ID to use for the backup policy. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location to create the backup policies of, in the format `projects/{project_id}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/backupPolicies", + "request": { + "$ref": "BackupPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the backup policy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupPolicies/{backupPoliciesId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.backupPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backup policy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified backup policy by backup_policy_id.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupPolicies/{backupPoliciesId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backupPolicy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "BackupPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns list of all available backup policies.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupPolicies", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupPolicies.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, the 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 ListBackupPoliciesRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/backupPolicies", + "response": { + "$ref": "ListBackupPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates settings of a specific backup policy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupPolicies/{backupPoliciesId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.backupPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the backup policy. Format: `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Backup Policy 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": "v1beta1/{+name}", + "request": { + "$ref": "BackupPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "backupVaults": { + "methods": { + "create": { + "description": "Creates new backup vault", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults", + "httpMethod": "POST", + "id": "netapp.projects.locations.backupVaults.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupVaultId": { + "description": "Required. The ID to use for the backupVault. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location to create the backup vaults, in the format `projects/{project_id}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/backupVaults", + "request": { + "$ref": "BackupVault" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the backup vault.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.backupVaults.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified backup vault", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupVaults.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "BackupVault" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns list of all available backup vaults.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupVaults.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location for which to retrieve backupVault information, in the format `projects/{project_id}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/backupVaults", + "response": { + "$ref": "ListBackupVaultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the settings of a specific backup vault.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.backupVaults.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the backup vault. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Backup resource to be updated. 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": "v1beta1/{+name}", + "request": { + "$ref": "BackupVault" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups", + "httpMethod": "POST", + "id": "netapp.projects.locations.backupVaults.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. The ID to use for the backup. The ID must be unique within the specified backupVault. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The NetApp backupVault to create the backups of, in the format `projects/*/locations/*/backupVaults/{backup_vault_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/backups", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the backup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.backupVaults.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified backup", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupVaults.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all backups for a backupVault.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups", + "httpMethod": "GET", + "id": "netapp.projects.locations.backupVaults.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The standard list filter. If specified, backups will be returned based on the attribute name that matches the filter expression. If empty, then no backups are filtered out. See https://google.aip.dev/160", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The backupVault for which to retrieve backup information, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. To retrieve backup information for all locations, use \"-\" for the `{location}` value. To retrieve backup information for all backupVaults, use \"-\" for the `{backup_vault_id}` value. To retrieve backup information for a volume, use \"-\" for the `{backup_vault_id}` value and specify volume full name with the filter.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/backups", + "response": { + "$ref": "ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update backup with full spec.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/backups/{backupsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.backupVaults.backups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the backup. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Backup resource to be updated. 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": "v1beta1/{+name}", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "kmsConfigs": { + "methods": { + "create": { + "description": "Creates a new KMS config.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/kmsConfigs", + "httpMethod": "POST", + "id": "netapp.projects.locations.kmsConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "kmsConfigId": { + "description": "Required. Id of the requesting KmsConfig. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/kmsConfigs", + "request": { + "$ref": "KmsConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the Kms config.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.kmsConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the KmsConfig.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "encrypt": { + "description": "Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}:encrypt", + "httpMethod": "POST", + "id": "netapp.projects.locations.kmsConfigs.encrypt", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the KmsConfig.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:encrypt", + "request": { + "$ref": "EncryptVolumesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified KMS config by kms_config_id.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.kmsConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the KmsConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "KmsConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all KMS configs owned by the caller.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/kmsConfigs", + "httpMethod": "GET", + "id": "netapp.projects.locations.kmsConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/kmsConfigs", + "response": { + "$ref": "ListKmsConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the Kms config properties with the full spec", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.kmsConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the KmsConfig.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the KmsConfig 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": "v1beta1/{+name}", + "request": { + "$ref": "KmsConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "verify": { + "description": "Verifies KMS config reachability.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/kmsConfigs/{kmsConfigsId}:verify", + "httpMethod": "POST", + "id": "netapp.projects.locations.kmsConfigs.verify", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the KMS Config to be verified.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/kmsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:verify", + "request": { + "$ref": "VerifyKmsConfigRequest" + }, + "response": { + "$ref": "VerifyKmsConfigResponse" + }, + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "netapp.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": "v1beta1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "netapp.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": "v1beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "netapp.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": "v1beta1/{+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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "netapp.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": "v1beta1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "storagePools": { + "methods": { + "create": { + "description": "Creates a new storage pool.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/storagePools", + "httpMethod": "POST", + "id": "netapp.projects.locations.storagePools.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "storagePoolId": { + "description": "Required. Id of the requesting storage pool. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/storagePools", + "request": { + "$ref": "StoragePool" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Warning! This operation will permanently delete the storage pool.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.storagePools.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the description of the specified storage pool by poolId.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.storagePools.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "StoragePool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all storage pools owned by the caller.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/storagePools", + "httpMethod": "GET", + "id": "netapp.projects.locations.storagePools.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/storagePools", + "response": { + "$ref": "ListStoragePoolsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the storage pool properties with the full spec", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.storagePools.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the StoragePool 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": "v1beta1/{+name}", + "request": { + "$ref": "StoragePool" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "switch": { + "description": "This operation will switch the active/replica zone for a regional storagePool.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}:switch", + "httpMethod": "POST", + "id": "netapp.projects.locations.storagePools.switch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:switch", + "request": { + "$ref": "SwitchActiveReplicaZoneRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "volumes": { + "methods": { + "create": { + "description": "Creates a new Volume in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "volumeId": { + "description": "Required. Id of the requesting volume. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/volumes", + "request": { + "$ref": "Volume" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Volume.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.volumes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "If this field is set as true, CCFE will not block the volume resource deletion even if it has any snapshots resource. (Otherwise, the request will only work if the volume has no snapshots.)", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the volume", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Volume.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the volume", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Volume" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Volumes in a given project.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.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, the 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 ListVolumesRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/volumes", + "response": { + "$ref": "ListVolumesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Volume.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.volumes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the volume", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Volume 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": "v1beta1/{+name}", + "request": { + "$ref": "Volume" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "revert": { + "description": "Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}:revert", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.revert", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the volume, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:revert", + "request": { + "$ref": "RevertVolumeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "replications": { + "methods": { + "create": { + "description": "Create a new replication for a volume.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.replications.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The NetApp volume to create the replications of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + }, + "replicationId": { + "description": "Required. ID of the replication to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/replications", + "request": { + "$ref": "Replication" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a replication.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.volumes.replications.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The replication resource name, in the format `projects/*/locations/*/volumes/*/replications/{replication_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Describe a replication for a volume.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.replications.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The replication resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Replication" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all replications for a volume.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.replications.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The volume for which to retrieve replication information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/replications", + "response": { + "$ref": "ListReplicationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the settings of a specific replication.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.volumes.replications.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the Replication. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one path must be supplied in this field.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Replication" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resume": { + "description": "Resume Cross Region Replication.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}:resume", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.replications.resume", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:resume", + "request": { + "$ref": "ResumeReplicationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "reverseDirection": { + "description": "Reverses direction of replication. Source becomes destination and destination becomes source.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}:reverseDirection", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.replications.reverseDirection", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:reverseDirection", + "request": { + "$ref": "ReverseReplicationDirectionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "stop": { + "description": "Stop Cross Region Replication.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/replications/{replicationsId}:stop", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.replications.stop", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:stop", + "request": { + "$ref": "StopReplicationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "snapshots": { + "methods": { + "create": { + "description": "Create a new snapshot for a volume.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.snapshots.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The NetApp volume to create the snapshots of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + }, + "snapshotId": { + "description": "Required. ID of the snapshot to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/snapshots", + "request": { + "$ref": "Snapshot" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a snapshot.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots/{snapshotsId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.volumes.snapshots.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The snapshot resource name, in the format `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Describe a snapshot for a volume.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots/{snapshotsId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.snapshots.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The snapshot resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Snapshot" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns descriptions of all snapshots for a volume.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.snapshots.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The volume for which to retrieve snapshot information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/snapshots", + "response": { + "$ref": "ListSnapshotsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the settings of a specific snapshot.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots/{snapshotsId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.volumes.snapshots.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the snapshot. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one path must be supplied in this field.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Snapshot" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20241002", + "rootUrl": "https://netapp.googleapis.com/", + "schemas": { + "ActiveDirectory": { + "description": "ActiveDirectory is the public representation of the active directory config.", + "id": "ActiveDirectory", + "properties": { + "administrators": { + "description": "Optional. Users to be added to the Built-in Admininstrators group.", + "items": { + "type": "string" + }, + "type": "array" + }, + "aesEncryption": { + "description": "If enabled, AES encryption will be enabled for SMB communication.", + "type": "boolean" + }, + "backupOperators": { + "description": "Optional. Users to be added to the Built-in Backup Operator active directory group.", + "items": { + "type": "string" + }, + "type": "array" + }, + "createTime": { + "description": "Output only. Create time of the active directory.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Description of the active directory.", + "type": "string" + }, + "dns": { + "description": "Required. Comma separated list of DNS server IP addresses for the Active Directory domain.", + "type": "string" + }, + "domain": { + "description": "Required. Name of the Active Directory domain", + "type": "string" + }, + "encryptDcConnections": { + "description": "If enabled, traffic between the SMB server to Domain Controller (DC) will be encrypted.", + "type": "boolean" + }, + "kdcHostname": { + "description": "Name of the active directory machine. This optional parameter is used only while creating kerberos volume", + "type": "string" + }, + "kdcIp": { + "description": "KDC server IP address for the active directory machine.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels for the active directory.", + "type": "object" + }, + "ldapSigning": { + "description": "Specifies whether or not the LDAP traffic needs to be signed.", + "type": "boolean" + }, + "name": { + "description": "Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.", + "type": "string" + }, + "netBiosPrefix": { + "description": "Required. NetBIOSPrefix is used as a prefix for SMB server name.", + "type": "string" + }, + "nfsUsersWithLdap": { + "description": "If enabled, will allow access to local users and LDAP users. If access is needed for only LDAP users, it has to be disabled.", + "type": "boolean" + }, + "organizationalUnit": { + "description": "The Organizational Unit (OU) within the Windows Active Directory the user belongs to.", + "type": "string" + }, + "password": { + "description": "Required. Password of the Active Directory domain administrator.", + "type": "string" + }, + "securityOperators": { + "description": "Optional. Domain users to be given the SeSecurityPrivilege.", + "items": { + "type": "string" + }, + "type": "array" + }, + "site": { + "description": "The Active Directory site the service will limit Domain Controller discovery too.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the AD.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "UPDATING", + "IN_USE", + "DELETING", + "ERROR", + "DIAGNOSING" + ], + "enumDescriptions": [ + "Unspecified Active Directory State", + "Active Directory State is Creating", + "Active Directory State is Ready", + "Active Directory State is Updating", + "Active Directory State is In use", + "Active Directory State is Deleting", + "Active Directory State is Error", + "Active Directory State is Diagnosing." + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. The state details of the Active Directory.", + "readOnly": true, + "type": "string" + }, + "username": { + "description": "Required. Username of the Active Directory domain administrator.", + "type": "string" + } + }, + "type": "object" + }, + "AssetLocation": { + "description": "Provides the mapping of a cloud asset to a direct physical location or to a proxy that defines the location on its behalf.", + "id": "AssetLocation", + "properties": { + "ccfeRmsPath": { + "description": "Spanner path of the CCFE RMS database. It is only applicable for CCFE tenants that use CCFE RMS for storing resource metadata.", + "type": "string" + }, + "expected": { + "$ref": "IsolationExpectations", + "description": "Defines the customer expectation around ZI/ZS for this asset and ZI/ZS state of the region at the time of asset creation." + }, + "extraParameters": { + "description": "Defines extra parameters required for specific asset types.", + "items": { + "$ref": "ExtraParameter" + }, + "type": "array" + }, + "locationData": { + "description": "Contains all kinds of physical location definitions for this asset.", + "items": { + "$ref": "LocationData" + }, + "type": "array" + }, + "parentAsset": { + "description": "Defines parents assets if any in order to allow later generation of child_asset_location data via child assets.", + "items": { + "$ref": "CloudAsset" + }, + "type": "array" + } + }, + "type": "object" + }, + "Backup": { + "description": "A NetApp Backup.", + "id": "Backup", + "properties": { + "backupType": { + "description": "Output only. Type of backup, manually created or created by a backup policy.", + "enum": [ + "TYPE_UNSPECIFIED", + "MANUAL", + "SCHEDULED" + ], + "enumDescriptions": [ + "Unspecified backup type.", + "Manual backup type.", + "Scheduled backup type." + ], + "readOnly": true, + "type": "string" + }, + "chainStorageBytes": { + "description": "Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size)", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the backup was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the backup. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.", + "type": "string" + }, + "sourceSnapshot": { + "description": "If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`", + "type": "string" + }, + "sourceVolume": { + "description": "Volume full name of this backup belongs to. Format: `projects/{projects_id}/locations/{location}/volumes/{volume_id}`", + "type": "string" + }, + "state": { + "description": "Output only. The backup state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "UPLOADING", + "READY", + "DELETING", + "ERROR", + "UPDATING" + ], + "enumDescriptions": [ + "State not set.", + "Backup is being created. While in this state, the snapshot for the backup point-in-time may not have been created yet, and so the point-in-time may not have been fixed.", + "Backup is being uploaded. While in this state, none of the writes to the volume will be included in the backup.", + "Backup is available for use.", + "Backup is being deleted.", + "Backup is not valid and cannot be used for creating new volumes or restoring existing volumes.", + "Backup is being updated." + ], + "readOnly": true, + "type": "string" + }, + "volumeUsageBytes": { + "description": "Output only. Size of the file system when the backup was created. When creating a new volume from the backup, the volume capacity will have to be at least as big.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BackupConfig": { + "description": "BackupConfig contains backup related config on a volume.", + "id": "BackupConfig", + "properties": { + "backupChainBytes": { + "description": "Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size).", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "backupPolicies": { + "description": "Optional. When specified, schedule backups will be created based on the policy configuration.", + "items": { + "type": "string" + }, + "type": "array" + }, + "backupVault": { + "description": "Optional. Name of backup vault. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}", + "type": "string" + }, + "scheduledBackupEnabled": { + "description": "Optional. When set to true, scheduled backup is enabled on the volume. This field should be nil when there's no backup policy attached.", + "type": "boolean" + } + }, + "type": "object" + }, + "BackupPolicy": { + "description": "Backup Policy.", + "id": "BackupPolicy", + "properties": { + "assignedVolumeCount": { + "description": "Output only. The total number of volumes assigned by this backup policy.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "createTime": { + "description": "Output only. The time when the backup policy was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dailyBackupLimit": { + "description": "Number of daily backups to keep. Note that the minimum daily backup limit is 2.", + "format": "int32", + "type": "integer" + }, + "description": { + "description": "Description of the backup policy.", + "type": "string" + }, + "enabled": { + "description": "If enabled, make backups automatically according to the schedules. This will be applied to all volumes that have this policy attached and enforced on volume level. If not specified, default is true.", + "type": "boolean" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "monthlyBackupLimit": { + "description": "Number of monthly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Identifier. The resource name of the backup policy. Format: `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.", + "type": "string" + }, + "state": { + "description": "Output only. The backup policy state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING", + "ERROR", + "UPDATING" + ], + "enumDescriptions": [ + "State not set.", + "BackupPolicy is being created.", + "BackupPolicy is available for use.", + "BackupPolicy is being deleted.", + "BackupPolicy is not valid and cannot be used.", + "BackupPolicy is being updated." + ], + "readOnly": true, + "type": "string" + }, + "weeklyBackupLimit": { + "description": "Number of weekly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "BackupVault": { + "description": "A NetApp BackupVault.", + "id": "BackupVault", + "properties": { + "createTime": { + "description": "Output only. Create time of the backup vault.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Description of the backup vault.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the backup vault. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.", + "type": "string" + }, + "state": { + "description": "Output only. The backup vault state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING", + "ERROR", + "UPDATING" + ], + "enumDescriptions": [ + "State not set.", + "BackupVault is being created.", + "BackupVault is available for use.", + "BackupVault is being deleted.", + "BackupVault is not valid and cannot be used.", + "BackupVault is being updated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BlobstoreLocation": { + "description": "Policy ID that identified data placement in Blobstore as per go/blobstore-user-guide#data-metadata-placement-and-failure-domains", + "id": "BlobstoreLocation", + "properties": { + "policyId": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "CloudAsset": { + "id": "CloudAsset", + "properties": { + "assetName": { + "type": "string" + }, + "assetType": { + "type": "string" + } + }, + "type": "object" + }, + "CloudAssetComposition": { + "id": "CloudAssetComposition", + "properties": { + "childAsset": { + "items": { + "$ref": "CloudAsset" + }, + "type": "array" + } + }, + "type": "object" + }, + "DailySchedule": { + "description": "Make a snapshot every day e.g. at 04:00, 05:20, 23:50", + "id": "DailySchedule", + "properties": { + "hour": { + "description": "Set the hour to start the snapshot (0-23), defaults to midnight (0).", + "format": "double", + "type": "number" + }, + "minute": { + "description": "Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).", + "format": "double", + "type": "number" + }, + "snapshotsToKeep": { + "description": "The maximum number of Snapshots to keep for the hourly schedule", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "DestinationVolumeParameters": { + "description": "DestinationVolumeParameters specify input parameters used for creating destination volume.", + "id": "DestinationVolumeParameters", + "properties": { + "description": { + "description": "Description for the destination volume.", + "type": "string" + }, + "shareName": { + "description": "Destination volume's share name. If not specified, source volume's share name will be used.", + "type": "string" + }, + "storagePool": { + "description": "Required. Existing destination StoragePool name.", + "type": "string" + }, + "volumeId": { + "description": "Desired destination volume resource id. If not specified, source volume's resource id will be used. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.", + "type": "string" + } + }, + "type": "object" + }, + "DirectLocationAssignment": { + "id": "DirectLocationAssignment", + "properties": { + "location": { + "items": { + "$ref": "LocationAssignment" + }, + "type": "array" + } + }, + "type": "object" + }, + "EncryptVolumesRequest": { + "description": "EncryptVolumesRequest specifies the KMS config to encrypt existing volumes.", + "id": "EncryptVolumesRequest", + "properties": {}, + "type": "object" + }, + "ExportPolicy": { + "description": "Defines the export policy for the volume.", + "id": "ExportPolicy", + "properties": { + "rules": { + "description": "Required. List of export policy rules", + "items": { + "$ref": "SimpleExportPolicyRule" + }, + "type": "array" + } + }, + "type": "object" + }, + "ExtraParameter": { + "description": "Defines parameters that should only be used for specific asset types.", + "id": "ExtraParameter", + "properties": { + "regionalMigDistributionPolicy": { + "$ref": "RegionalMigDistributionPolicy", + "description": "Details about zones used by regional compute.googleapis.com/InstanceGroupManager to create instances." + } + }, + "type": "object" + }, + "GoogleProtobufEmpty": { + "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": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "HourlySchedule": { + "description": "Make a snapshot every hour e.g. at 04:00, 05:00, 06:00.", + "id": "HourlySchedule", + "properties": { + "minute": { + "description": "Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).", + "format": "double", + "type": "number" + }, + "snapshotsToKeep": { + "description": "The maximum number of Snapshots to keep for the hourly schedule", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "IsolationExpectations": { + "id": "IsolationExpectations", + "properties": { + "requirementOverride": { + "$ref": "RequirementOverride", + "description": "Explicit overrides for ZI and ZS requirements to be used for resources that should be excluded from ZI/ZS verification logic." + }, + "ziOrgPolicy": { + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "ziRegionPolicy": { + "enum": [ + "ZI_REGION_POLICY_UNSPECIFIED", + "ZI_REGION_POLICY_UNKNOWN", + "ZI_REGION_POLICY_NOT_SET", + "ZI_REGION_POLICY_FAIL_OPEN", + "ZI_REGION_POLICY_FAIL_CLOSED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "ziRegionState": { + "enum": [ + "ZI_REGION_UNSPECIFIED", + "ZI_REGION_UNKNOWN", + "ZI_REGION_NOT_ENABLED", + "ZI_REGION_ENABLED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zoneIsolation": { + "deprecated": true, + "description": "Deprecated: use zi_org_policy, zi_region_policy and zi_region_state instead for setting ZI expectations as per go/zicy-publish-physical-location.", + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "zoneSeparation": { + "deprecated": true, + "description": "Deprecated: use zs_org_policy, and zs_region_stateinstead for setting Zs expectations as per go/zicy-publish-physical-location.", + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zsOrgPolicy": { + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zsRegionState": { + "enum": [ + "ZS_REGION_UNSPECIFIED", + "ZS_REGION_UNKNOWN", + "ZS_REGION_NOT_ENABLED", + "ZS_REGION_ENABLED" + ], + "enumDescriptions": [ + "", + "To be used if tracking of the asset ZS-bit is not available", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "KmsConfig": { + "description": "KmsConfig is the customer managed encryption key(CMEK) configuration.", + "id": "KmsConfig", + "properties": { + "createTime": { + "description": "Output only. Create time of the KmsConfig.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "cryptoKeyName": { + "description": "Required. Customer managed crypto key resource full name. Format: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}.", + "type": "string" + }, + "description": { + "description": "Description of the KmsConfig.", + "type": "string" + }, + "instructions": { + "description": "Output only. Instructions to provide the access to the customer provided encryption key.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "name": { + "description": "Identifier. Name of the KmsConfig.", + "type": "string" + }, + "serviceAccount": { + "description": "Output only. The Service account which will have access to the customer provided encryption key.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the KmsConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "DELETING", + "UPDATING", + "IN_USE", + "ERROR", + "KEY_CHECK_PENDING", + "KEY_NOT_REACHABLE", + "DISABLING", + "DISABLED", + "MIGRATING" + ], + "enumDescriptions": [ + "Unspecified KmsConfig State", + "KmsConfig State is Ready", + "KmsConfig State is Creating", + "KmsConfig State is Deleting", + "KmsConfig State is Updating", + "KmsConfig State is In Use.", + "KmsConfig State is Error", + "KmsConfig State is Pending to verify crypto key access.", + "KmsConfig State is Not accessbile by the SDE service account to the crypto key.", + "KmsConfig State is Disabling.", + "KmsConfig State is Disabled.", + "KmsConfig State is Migrating. The existing volumes are migrating from SMEK to CMEK." + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the KmsConfig.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ListActiveDirectoriesResponse": { + "description": "ListActiveDirectoriesResponse contains all the active directories requested.", + "id": "ListActiveDirectoriesResponse", + "properties": { + "activeDirectories": { + "description": "The list of active directories.", + "items": { + "$ref": "ActiveDirectory" + }, + "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" + }, + "ListBackupPoliciesResponse": { + "description": "ListBackupPoliciesResponse contains all the backup policies requested.", + "id": "ListBackupPoliciesResponse", + "properties": { + "backupPolicies": { + "description": "The list of backup policies.", + "items": { + "$ref": "BackupPolicy" + }, + "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" + }, + "ListBackupVaultsResponse": { + "description": "ListBackupVaultsResponse is the result of ListBackupVaultsRequest.", + "id": "ListBackupVaultsResponse", + "properties": { + "backupVaults": { + "description": "A list of backupVaults in the project for the specified location.", + "items": { + "$ref": "BackupVault" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token you can use to retrieve the next page of results. Not returned if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListBackupsResponse": { + "description": "ListBackupsResponse is the result of ListBackupsRequest.", + "id": "ListBackupsResponse", + "properties": { + "backups": { + "description": "A list of backups in the project.", + "items": { + "$ref": "Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token you can use to retrieve the next page of results. Not returned if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListKmsConfigsResponse": { + "description": "ListKmsConfigsResponse is the response to a ListKmsConfigsRequest.", + "id": "ListKmsConfigsResponse", + "properties": { + "kmsConfigs": { + "description": "The list of KmsConfigs", + "items": { + "$ref": "KmsConfig" + }, + "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" + }, + "ListReplicationsResponse": { + "description": "ListReplicationsResponse is the result of ListReplicationsRequest.", + "id": "ListReplicationsResponse", + "properties": { + "nextPageToken": { + "description": "The token you can use to retrieve the next page of results. Not returned if there are no more results in the list.", + "type": "string" + }, + "replications": { + "description": "A list of replications in the project for the specified volume.", + "items": { + "$ref": "Replication" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSnapshotsResponse": { + "description": "ListSnapshotsResponse is the result of ListSnapshotsRequest.", + "id": "ListSnapshotsResponse", + "properties": { + "nextPageToken": { + "description": "The token you can use to retrieve the next page of results. Not returned if there are no more results in the list.", + "type": "string" + }, + "snapshots": { + "description": "A list of snapshots in the project for the specified volume.", + "items": { + "$ref": "Snapshot" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListStoragePoolsResponse": { + "description": "ListStoragePoolsResponse is the response to a ListStoragePoolsRequest.", + "id": "ListStoragePoolsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "storagePools": { + "description": "The list of StoragePools", + "items": { + "$ref": "StoragePool" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListVolumesResponse": { + "description": "Message for response to listing Volumes", + "id": "ListVolumesResponse", + "properties": { + "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" + }, + "volumes": { + "description": "The list of Volume", + "items": { + "$ref": "Volume" + }, + "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" + }, + "LocationAssignment": { + "id": "LocationAssignment", + "properties": { + "location": { + "type": "string" + }, + "locationType": { + "enum": [ + "UNSPECIFIED", + "CLUSTER", + "POP", + "CLOUD_ZONE", + "CLOUD_REGION", + "MULTI_REGION_GEO", + "MULTI_REGION_JURISDICTION", + "GLOBAL", + "OTHER" + ], + "enumDescriptions": [ + "", + "1-10: Physical failure domains.", + "", + "11-20: Logical failure domains.", + "", + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "LocationData": { + "id": "LocationData", + "properties": { + "blobstoreLocation": { + "$ref": "BlobstoreLocation" + }, + "childAssetLocation": { + "$ref": "CloudAssetComposition" + }, + "directLocation": { + "$ref": "DirectLocationAssignment" + }, + "gcpProjectProxy": { + "$ref": "TenantProjectProxy" + }, + "placerLocation": { + "$ref": "PlacerLocation" + }, + "spannerLocation": { + "$ref": "SpannerLocation" + } + }, + "type": "object" + }, + "LocationMetadata": { + "description": "Metadata for a given google.cloud.location.Location.", + "id": "LocationMetadata", + "properties": { + "supportedServiceLevels": { + "description": "Output only. Supported service levels in a location.", + "items": { + "enum": [ + "SERVICE_LEVEL_UNSPECIFIED", + "PREMIUM", + "EXTREME", + "STANDARD", + "FLEX" + ], + "enumDescriptions": [ + "Unspecified service level.", + "Premium service level.", + "Extreme service level.", + "Standard service level.", + "Flex service level." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "MonthlySchedule": { + "description": "Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50", + "id": "MonthlySchedule", + "properties": { + "daysOfMonth": { + "description": "Set the day or days of the month to make a snapshot (1-31). Accepts a comma separated number of days. Defaults to '1'.", + "type": "string" + }, + "hour": { + "description": "Set the hour to start the snapshot (0-23), defaults to midnight (0).", + "format": "double", + "type": "number" + }, + "minute": { + "description": "Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).", + "format": "double", + "type": "number" + }, + "snapshotsToKeep": { + "description": "The maximum number of Snapshots to keep for the hourly schedule", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "MountOption": { + "description": "View only mount options for a volume.", + "id": "MountOption", + "properties": { + "export": { + "description": "Export string", + "type": "string" + }, + "exportFull": { + "description": "Full export string", + "type": "string" + }, + "instructions": { + "description": "Instructions for mounting", + "type": "string" + }, + "protocol": { + "description": "Protocol to mount with.", + "enum": [ + "PROTOCOLS_UNSPECIFIED", + "NFSV3", + "NFSV4", + "SMB" + ], + "enumDescriptions": [ + "Unspecified protocol", + "NFS V3 protocol", + "NFS V4 protocol", + "SMB protocol" + ], + "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 been canceled successfully 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" + }, + "PlacerLocation": { + "description": "Message describing that the location of the customer resource is tied to placer allocations", + "id": "PlacerLocation", + "properties": { + "placerConfig": { + "description": "Directory with a config related to it in placer (e.g. \"/placer/prod/home/my-root/my-dir\")", + "type": "string" + } + }, + "type": "object" + }, + "RegionalMigDistributionPolicy": { + "description": "To be used for specifying the intended distribution of regional compute.googleapis.com/InstanceGroupManager instances", + "id": "RegionalMigDistributionPolicy", + "properties": { + "targetShape": { + "description": "The shape in which the group converges around distribution of resources. Instance of proto2 enum", + "format": "int32", + "type": "integer" + }, + "zones": { + "description": "Cloud zones used by regional MIG to create instances.", + "items": { + "$ref": "ZoneConfiguration" + }, + "type": "array" + } + }, + "type": "object" + }, + "Replication": { + "description": "Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.", + "id": "Replication", + "properties": { + "createTime": { + "description": "Output only. Replication create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description about this replication relationship.", + "type": "string" + }, + "destinationVolume": { + "description": "Output only. Full name of destination volume resource. Example : \"projects/{project}/locations/{location}/volumes/{volume_id}\"", + "readOnly": true, + "type": "string" + }, + "destinationVolumeParameters": { + "$ref": "DestinationVolumeParameters", + "description": "Required. Input only. Destination volume parameters" + }, + "healthy": { + "description": "Output only. Condition of the relationship. Can be one of the following: - true: The replication relationship is healthy. It has not missed the most recent scheduled transfer. - false: The replication relationship is not healthy. It has missed the most recent scheduled transfer.", + "readOnly": true, + "type": "boolean" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "mirrorState": { + "description": "Output only. Indicates the state of mirroring.", + "enum": [ + "MIRROR_STATE_UNSPECIFIED", + "PREPARING", + "MIRRORED", + "STOPPED", + "TRANSFERRING" + ], + "enumDescriptions": [ + "Unspecified MirrorState", + "Destination volume is being prepared.", + "Destination volume has been initialized and is ready to receive replication transfers.", + "Destination volume is not receiving replication transfers.", + "Incremental replication is in progress." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of the Replication. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.", + "type": "string" + }, + "replicationSchedule": { + "description": "Required. Indicates the schedule for replication.", + "enum": [ + "REPLICATION_SCHEDULE_UNSPECIFIED", + "EVERY_10_MINUTES", + "HOURLY", + "DAILY" + ], + "enumDescriptions": [ + "Unspecified ReplicationSchedule", + "Replication happens once every 10 minutes.", + "Replication happens once every hour.", + "Replication happens once every day." + ], + "type": "string" + }, + "role": { + "description": "Output only. Indicates whether this points to source or destination.", + "enum": [ + "REPLICATION_ROLE_UNSPECIFIED", + "SOURCE", + "DESTINATION" + ], + "enumDescriptions": [ + "Unspecified replication role", + "Indicates Source volume.", + "Indicates Destination volume." + ], + "readOnly": true, + "type": "string" + }, + "sourceVolume": { + "description": "Output only. Full name of source volume resource. Example : \"projects/{project}/locations/{location}/volumes/{volume_id}\"", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the replication.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "UPDATING", + "DELETING", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified replication State", + "Replication is creating.", + "Replication is ready.", + "Replication is updating.", + "Replication is deleting.", + "Replication is in error state." + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the replication.", + "readOnly": true, + "type": "string" + }, + "transferStats": { + "$ref": "TransferStats", + "description": "Output only. Replication transfer statistics.", + "readOnly": true + } + }, + "type": "object" + }, + "RequirementOverride": { + "id": "RequirementOverride", + "properties": { + "ziOverride": { + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "zsOverride": { + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "RestoreParameters": { + "description": "The RestoreParameters if volume is created from a snapshot or backup.", + "id": "RestoreParameters", + "properties": { + "sourceBackup": { + "description": "Full name of the backup resource. Format: projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}", + "type": "string" + }, + "sourceSnapshot": { + "description": "Full name of the snapshot resource. Format: projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}", + "type": "string" + } + }, + "type": "object" + }, + "ResumeReplicationRequest": { + "description": "ResumeReplicationRequest resumes a stopped replication.", + "id": "ResumeReplicationRequest", + "properties": {}, + "type": "object" + }, + "ReverseReplicationDirectionRequest": { + "description": "ReverseReplicationDirectionRequest reverses direction of replication. Source becomes destination and destination becomes source.", + "id": "ReverseReplicationDirectionRequest", + "properties": {}, + "type": "object" + }, + "RevertVolumeRequest": { + "description": "RevertVolumeRequest reverts the given volume to the specified snapshot.", + "id": "RevertVolumeRequest", + "properties": { + "snapshotId": { + "description": "Required. The snapshot resource ID, in the format 'my-snapshot', where the specified ID is the {snapshot_id} of the fully qualified name like projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id}", + "type": "string" + } + }, + "type": "object" + }, + "SimpleExportPolicyRule": { + "description": "An export policy rule describing various export options.", + "id": "SimpleExportPolicyRule", + "properties": { + "accessType": { + "description": "Access type (ReadWrite, ReadOnly, None)", + "enum": [ + "ACCESS_TYPE_UNSPECIFIED", + "READ_ONLY", + "READ_WRITE", + "READ_NONE" + ], + "enumDescriptions": [ + "Unspecified Access Type", + "Read Only", + "Read Write", + "None" + ], + "type": "string" + }, + "allowedClients": { + "description": "Comma separated list of allowed clients IP addresses", + "type": "string" + }, + "hasRootAccess": { + "description": "Whether Unix root access will be granted.", + "type": "string" + }, + "kerberos5ReadOnly": { + "description": "If enabled (true) the rule defines a read only access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'authentication' kerberos security mode.", + "type": "boolean" + }, + "kerberos5ReadWrite": { + "description": "If enabled (true) the rule defines read and write access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'authentication' kerberos security mode. The 'kerberos5ReadOnly' value be ignored if this is enabled.", + "type": "boolean" + }, + "kerberos5iReadOnly": { + "description": "If enabled (true) the rule defines a read only access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'integrity' kerberos security mode.", + "type": "boolean" + }, + "kerberos5iReadWrite": { + "description": "If enabled (true) the rule defines read and write access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' value be ignored if this is enabled.", + "type": "boolean" + }, + "kerberos5pReadOnly": { + "description": "If enabled (true) the rule defines a read only access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'privacy' kerberos security mode.", + "type": "boolean" + }, + "kerberos5pReadWrite": { + "description": "If enabled (true) the rule defines read and write access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' value be ignored if this is enabled.", + "type": "boolean" + }, + "nfsv3": { + "description": "NFS V3 protocol.", + "type": "boolean" + }, + "nfsv4": { + "description": "NFS V4 protocol.", + "type": "boolean" + } + }, + "type": "object" + }, + "Snapshot": { + "description": "Snapshot is a point-in-time version of a Volume's content.", + "id": "Snapshot", + "properties": { + "createTime": { + "description": "Output only. The time when the snapshot was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the snapshot. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.", + "type": "string" + }, + "state": { + "description": "Output only. The snapshot state.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "DELETING", + "UPDATING", + "DISABLED", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified Snapshot State", + "Snapshot State is Ready", + "Snapshot State is Creating", + "Snapshot State is Deleting", + "Snapshot State is Updating", + "Snapshot State is Disabled", + "Snapshot State is Error" + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the storage pool", + "readOnly": true, + "type": "string" + }, + "usedBytes": { + "description": "Output only. Current storage usage for the snapshot in bytes.", + "format": "double", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "SnapshotPolicy": { + "description": "Snapshot Policy for a volume.", + "id": "SnapshotPolicy", + "properties": { + "dailySchedule": { + "$ref": "DailySchedule", + "description": "Daily schedule policy." + }, + "enabled": { + "description": "If enabled, make snapshots automatically according to the schedules. Default is false.", + "type": "boolean" + }, + "hourlySchedule": { + "$ref": "HourlySchedule", + "description": "Hourly schedule policy." + }, + "monthlySchedule": { + "$ref": "MonthlySchedule", + "description": "Monthly schedule policy." + }, + "weeklySchedule": { + "$ref": "WeeklySchedule", + "description": "Weekly schedule policy." + } + }, + "type": "object" + }, + "SpannerLocation": { + "id": "SpannerLocation", + "properties": { + "backupName": { + "description": "Set of backups used by the resource with name in the same format as what is available at http://table/spanner_automon.backup_metadata", + "items": { + "type": "string" + }, + "type": "array" + }, + "dbName": { + "description": "Set of databases used by the resource in format /span//", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "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" + }, + "StopReplicationRequest": { + "description": "StopReplicationRequest stops a replication until resumed.", + "id": "StopReplicationRequest", + "properties": { + "force": { + "description": "Indicates whether to stop replication forcefully while data transfer is in progress. Warning! if force is true, this will abort any current transfers and can lead to data loss due to partial transfer. If force is false, stop replication will fail while data transfer is in progress and you will need to retry later.", + "type": "boolean" + } + }, + "type": "object" + }, + "StoragePool": { + "description": "StoragePool is a container for volumes with a service level and capacity. Volumes can be created in a pool of sufficient available capacity. StoragePool capacity is what you are billed for.", + "id": "StoragePool", + "properties": { + "activeDirectory": { + "description": "Optional. Specifies the Active Directory to be used for creating a SMB volume.", + "type": "string" + }, + "allowAutoTiering": { + "description": "Optional. True if the storage pool supports Auto Tiering enabled volumes. Default is false. Auto-tiering can be enabled after storage pool creation but it can't be disabled once enabled.", + "type": "boolean" + }, + "capacityGib": { + "description": "Required. Capacity in GIB of the pool", + "format": "int64", + "type": "string" + }, + "createTime": { + "description": "Output only. Create time of the storage pool", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the storage pool", + "type": "string" + }, + "encryptionType": { + "description": "Output only. Specifies the current pool encryption key source.", + "enum": [ + "ENCRYPTION_TYPE_UNSPECIFIED", + "SERVICE_MANAGED", + "CLOUD_KMS" + ], + "enumDescriptions": [ + "The source of the encryption key is not specified.", + "Google managed encryption key.", + "Customer managed encryption key, which is stored in KMS." + ], + "readOnly": true, + "type": "string" + }, + "globalAccessAllowed": { + "deprecated": true, + "description": "Deprecated. Used to allow SO pool to access AD or DNS server from other regions.", + "type": "boolean" + }, + "kmsConfig": { + "description": "Optional. Specifies the KMS config to be used for volume encryption.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs", + "type": "object" + }, + "ldapEnabled": { + "description": "Optional. Flag indicating if the pool is NFS LDAP enabled or not.", + "type": "boolean" + }, + "name": { + "description": "Identifier. Name of the storage pool", + "type": "string" + }, + "network": { + "description": "Required. VPC Network name. Format: projects/{project}/global/networks/{network}", + "type": "string" + }, + "psaRange": { + "description": "Optional. This field is not implemented. The values provided in this field are ignored.", + "type": "string" + }, + "replicaZone": { + "description": "Optional. Specifies the replica zone for regional storagePool.", + "type": "string" + }, + "serviceLevel": { + "description": "Required. Service level of the storage pool", + "enum": [ + "SERVICE_LEVEL_UNSPECIFIED", + "PREMIUM", + "EXTREME", + "STANDARD", + "FLEX" + ], + "enumDescriptions": [ + "Unspecified service level.", + "Premium service level.", + "Extreme service level.", + "Standard service level.", + "Flex service level." + ], + "type": "string" + }, + "state": { + "description": "Output only. State of the storage pool", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "DELETING", + "UPDATING", + "RESTORING", + "DISABLED", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified Storage Pool State", + "Storage Pool State is Ready", + "Storage Pool State is Creating", + "Storage Pool State is Deleting", + "Storage Pool State is Updating", + "Storage Pool State is Restoring", + "Storage Pool State is Disabled", + "Storage Pool State is Error" + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the storage pool", + "readOnly": true, + "type": "string" + }, + "volumeCapacityGib": { + "description": "Output only. Allocated size of all volumes in GIB in the storage pool", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "volumeCount": { + "description": "Output only. Volume count of the storage pool", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "zone": { + "description": "Optional. Specifies the active zone for regional storagePool.", + "type": "string" + } + }, + "type": "object" + }, + "SwitchActiveReplicaZoneRequest": { + "description": "SwitchActiveReplicaZoneRequest switch the active/replica zone for a regional storagePool.", + "id": "SwitchActiveReplicaZoneRequest", + "properties": {}, + "type": "object" + }, + "TenantProjectProxy": { + "id": "TenantProjectProxy", + "properties": { + "projectNumbers": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TieringPolicy": { + "description": "Defines tiering policy for the volume.", + "id": "TieringPolicy", + "properties": { + "coolingThresholdDays": { + "description": "Optional. Time in days to mark the volume's data block as cold and make it eligible for tiering, can be range from 7-183. Default is 31.", + "format": "int32", + "type": "integer" + }, + "tierAction": { + "description": "Optional. Flag indicating if the volume has tiering policy enable/pause. Default is PAUSED.", + "enum": [ + "TIER_ACTION_UNSPECIFIED", + "ENABLED", + "PAUSED" + ], + "enumDescriptions": [ + "Unspecified.", + "When tiering is enabled, new cold data will be tiered.", + "When paused, tiering won't be performed on new data. Existing data stays tiered until accessed." + ], + "type": "string" + } + }, + "type": "object" + }, + "TransferStats": { + "description": "TransferStats reports all statistics related to replication transfer.", + "id": "TransferStats", + "properties": { + "lagDuration": { + "description": "Lag duration indicates the duration by which Destination region volume content lags behind the primary region volume content.", + "format": "google-duration", + "type": "string" + }, + "lastTransferBytes": { + "description": "Last transfer size in bytes.", + "format": "int64", + "type": "string" + }, + "lastTransferDuration": { + "description": "Time taken during last transfer.", + "format": "google-duration", + "type": "string" + }, + "lastTransferEndTime": { + "description": "Time when last transfer completed.", + "format": "google-datetime", + "type": "string" + }, + "lastTransferError": { + "description": "A message describing the cause of the last transfer failure.", + "type": "string" + }, + "totalTransferDuration": { + "description": "Cumulative time taken across all transfers for the replication relationship.", + "format": "google-duration", + "type": "string" + }, + "transferBytes": { + "description": "Cumulative bytes trasferred so far for the replication relatinonship.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "Time when progress was updated last.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "VerifyKmsConfigRequest": { + "description": "VerifyKmsConfigRequest specifies the KMS config to be validated.", + "id": "VerifyKmsConfigRequest", + "properties": {}, + "type": "object" + }, + "VerifyKmsConfigResponse": { + "description": "VerifyKmsConfigResponse contains the information if the config is correctly and error message.", + "id": "VerifyKmsConfigResponse", + "properties": { + "healthError": { + "description": "Output only. Error message if config is not healthy.", + "readOnly": true, + "type": "string" + }, + "healthy": { + "description": "Output only. If the customer key configured correctly to the encrypt volume.", + "readOnly": true, + "type": "boolean" + }, + "instructions": { + "description": "Output only. Instructions for the customers to provide the access to the encryption key.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Volume": { + "description": "Volume provides a filesystem that you can mount.", + "id": "Volume", + "properties": { + "activeDirectory": { + "description": "Output only. Specifies the ActiveDirectory name of a SMB volume.", + "readOnly": true, + "type": "string" + }, + "backupConfig": { + "$ref": "BackupConfig", + "description": "BackupConfig of the volume." + }, + "capacityGib": { + "description": "Required. Capacity in GIB of the volume", + "format": "int64", + "type": "string" + }, + "coldTierSizeGib": { + "description": "Output only. Size of the volume cold tier data in GiB.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Create time of the volume", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the volume", + "type": "string" + }, + "encryptionType": { + "description": "Output only. Specified the current volume encryption key source.", + "enum": [ + "ENCRYPTION_TYPE_UNSPECIFIED", + "SERVICE_MANAGED", + "CLOUD_KMS" + ], + "enumDescriptions": [ + "The source of the encryption key is not specified.", + "Google managed encryption key.", + "Customer managed encryption key, which is stored in KMS." + ], + "readOnly": true, + "type": "string" + }, + "exportPolicy": { + "$ref": "ExportPolicy", + "description": "Optional. Export policy of the volume" + }, + "hasReplication": { + "description": "Output only. Indicates whether the volume is part of a replication relationship.", + "readOnly": true, + "type": "boolean" + }, + "kerberosEnabled": { + "description": "Optional. Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).", + "type": "boolean" + }, + "kmsConfig": { + "description": "Output only. Specifies the KMS config to be used for volume encryption.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs", + "type": "object" + }, + "largeCapacity": { + "description": "Optional. Flag indicating if the volume will be a large capacity volume or a regular volume.", + "type": "boolean" + }, + "ldapEnabled": { + "description": "Output only. Flag indicating if the volume is NFS LDAP enabled or not.", + "readOnly": true, + "type": "boolean" + }, + "mountOptions": { + "description": "Output only. Mount options of this volume", + "items": { + "$ref": "MountOption" + }, + "readOnly": true, + "type": "array" + }, + "multipleEndpoints": { + "description": "Optional. Flag indicating if the volume will have an IP address per node for volumes supporting multiple IP endpoints. Only the volume with large_capacity will be allowed to have multiple endpoints.", + "type": "boolean" + }, + "name": { + "description": "Identifier. Name of the volume", + "type": "string" + }, + "network": { + "description": "Output only. VPC Network name. Format: projects/{project}/global/networks/{network}", + "readOnly": true, + "type": "string" + }, + "protocols": { + "description": "Required. Protocols required for the volume", + "items": { + "enum": [ + "PROTOCOLS_UNSPECIFIED", + "NFSV3", + "NFSV4", + "SMB" + ], + "enumDescriptions": [ + "Unspecified protocol", + "NFS V3 protocol", + "NFS V4 protocol", + "SMB protocol" + ], + "type": "string" + }, + "type": "array" + }, + "psaRange": { + "description": "Output only. This field is not implemented. The values provided in this field are ignored.", + "readOnly": true, + "type": "string" + }, + "replicaZone": { + "description": "Output only. Specifies the replica zone for regional volume.", + "readOnly": true, + "type": "string" + }, + "restoreParameters": { + "$ref": "RestoreParameters", + "description": "Optional. Specifies the source of the volume to be created from." + }, + "restrictedActions": { + "description": "Optional. List of actions that are restricted on this volume.", + "items": { + "enum": [ + "RESTRICTED_ACTION_UNSPECIFIED", + "DELETE" + ], + "enumDescriptions": [ + "Unspecified restricted action", + "Prevent volume from being deleted when mounted." + ], + "type": "string" + }, + "type": "array" + }, + "securityStyle": { + "description": "Optional. Security Style of the Volume", + "enum": [ + "SECURITY_STYLE_UNSPECIFIED", + "NTFS", + "UNIX" + ], + "enumDescriptions": [ + "SecurityStyle is unspecified", + "SecurityStyle uses NTFS", + "SecurityStyle uses UNIX" + ], + "type": "string" + }, + "serviceLevel": { + "description": "Output only. Service level of the volume", + "enum": [ + "SERVICE_LEVEL_UNSPECIFIED", + "PREMIUM", + "EXTREME", + "STANDARD", + "FLEX" + ], + "enumDescriptions": [ + "Unspecified service level.", + "Premium service level.", + "Extreme service level.", + "Standard service level.", + "Flex service level." + ], + "readOnly": true, + "type": "string" + }, + "shareName": { + "description": "Required. Share name of the volume", + "type": "string" + }, + "smbSettings": { + "description": "Optional. SMB share settings for the volume.", + "items": { + "enum": [ + "SMB_SETTINGS_UNSPECIFIED", + "ENCRYPT_DATA", + "BROWSABLE", + "CHANGE_NOTIFY", + "NON_BROWSABLE", + "OPLOCKS", + "SHOW_SNAPSHOT", + "SHOW_PREVIOUS_VERSIONS", + "ACCESS_BASED_ENUMERATION", + "CONTINUOUSLY_AVAILABLE" + ], + "enumDescriptions": [ + "Unspecified default option", + "SMB setting encrypt data", + "SMB setting browsable", + "SMB setting notify change", + "SMB setting not to notify change", + "SMB setting oplocks", + "SMB setting to show snapshots", + "SMB setting to show previous versions", + "SMB setting to access volume based on enumerartion", + "Continuously available enumeration" + ], + "type": "string" + }, + "type": "array" + }, + "snapReserve": { + "description": "Optional. Snap_reserve specifies percentage of volume storage reserved for snapshot storage. Default is 0 percent.", + "format": "double", + "type": "number" + }, + "snapshotDirectory": { + "description": "Optional. Snapshot_directory if enabled (true) the volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots.", + "type": "boolean" + }, + "snapshotPolicy": { + "$ref": "SnapshotPolicy", + "description": "Optional. SnapshotPolicy for a volume." + }, + "state": { + "description": "Output only. State of the volume", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "DELETING", + "UPDATING", + "RESTORING", + "DISABLED", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified Volume State", + "Volume State is Ready", + "Volume State is Creating", + "Volume State is Deleting", + "Volume State is Updating", + "Volume State is Restoring", + "Volume State is Disabled", + "Volume State is Error" + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the volume", + "readOnly": true, + "type": "string" + }, + "storagePool": { + "description": "Required. StoragePool name of the volume", + "type": "string" + }, + "tieringPolicy": { + "$ref": "TieringPolicy", + "description": "Tiering policy for the volume." + }, + "unixPermissions": { + "description": "Optional. Default unix style permission (e.g. 777) the mount point will be created with. Applicable for NFS protocol types only.", + "type": "string" + }, + "usedGib": { + "description": "Output only. Used capacity in GIB of the volume. This is computed periodically and it does not represent the realtime usage.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "zone": { + "description": "Output only. Specifies the active zone for regional volume.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "WeeklySchedule": { + "description": "Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday 23:50", + "id": "WeeklySchedule", + "properties": { + "day": { + "description": "Set the day or days of the week to make a snapshot. Accepts a comma separated days of the week. Defaults to 'Sunday'.", + "type": "string" + }, + "hour": { + "description": "Set the hour to start the snapshot (0-23), defaults to midnight (0).", + "format": "double", + "type": "number" + }, + "minute": { + "description": "Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).", + "format": "double", + "type": "number" + }, + "snapshotsToKeep": { + "description": "The maximum number of Snapshots to keep for the hourly schedule", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "ZoneConfiguration": { + "id": "ZoneConfiguration", + "properties": { + "zone": { + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "NetApp API", + "version": "v1beta1", + "version_module": true +} \ No newline at end of file diff --git a/netapp/v1beta1/netapp-gen.go b/netapp/v1beta1/netapp-gen.go new file mode 100644 index 00000000000..3765034a85f --- /dev/null +++ b/netapp/v1beta1/netapp-gen.go @@ -0,0 +1,9357 @@ +// Copyright 2024 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 netapp provides access to the NetApp API. +// +// For product documentation, see: https://cloud.google.com/netapp/ +// +// # 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/netapp/v1beta1" +// ... +// ctx := context.Background() +// netappService, err := netapp.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]: +// +// netappService, err := netapp.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, ...) +// netappService, err := netapp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package netapp // import "google.golang.org/api/netapp/v1beta1" + +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 = "netapp:v1beta1" +const apiName = "netapp" +const apiVersion = "v1beta1" +const basePath = "https://netapp.googleapis.com/" +const basePathTemplate = "https://netapp.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://netapp.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.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + 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.ActiveDirectories = NewProjectsLocationsActiveDirectoriesService(s) + rs.BackupPolicies = NewProjectsLocationsBackupPoliciesService(s) + rs.BackupVaults = NewProjectsLocationsBackupVaultsService(s) + rs.KmsConfigs = NewProjectsLocationsKmsConfigsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.StoragePools = NewProjectsLocationsStoragePoolsService(s) + rs.Volumes = NewProjectsLocationsVolumesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + ActiveDirectories *ProjectsLocationsActiveDirectoriesService + + BackupPolicies *ProjectsLocationsBackupPoliciesService + + BackupVaults *ProjectsLocationsBackupVaultsService + + KmsConfigs *ProjectsLocationsKmsConfigsService + + Operations *ProjectsLocationsOperationsService + + StoragePools *ProjectsLocationsStoragePoolsService + + Volumes *ProjectsLocationsVolumesService +} + +func NewProjectsLocationsActiveDirectoriesService(s *Service) *ProjectsLocationsActiveDirectoriesService { + rs := &ProjectsLocationsActiveDirectoriesService{s: s} + return rs +} + +type ProjectsLocationsActiveDirectoriesService struct { + s *Service +} + +func NewProjectsLocationsBackupPoliciesService(s *Service) *ProjectsLocationsBackupPoliciesService { + rs := &ProjectsLocationsBackupPoliciesService{s: s} + return rs +} + +type ProjectsLocationsBackupPoliciesService struct { + s *Service +} + +func NewProjectsLocationsBackupVaultsService(s *Service) *ProjectsLocationsBackupVaultsService { + rs := &ProjectsLocationsBackupVaultsService{s: s} + rs.Backups = NewProjectsLocationsBackupVaultsBackupsService(s) + return rs +} + +type ProjectsLocationsBackupVaultsService struct { + s *Service + + Backups *ProjectsLocationsBackupVaultsBackupsService +} + +func NewProjectsLocationsBackupVaultsBackupsService(s *Service) *ProjectsLocationsBackupVaultsBackupsService { + rs := &ProjectsLocationsBackupVaultsBackupsService{s: s} + return rs +} + +type ProjectsLocationsBackupVaultsBackupsService struct { + s *Service +} + +func NewProjectsLocationsKmsConfigsService(s *Service) *ProjectsLocationsKmsConfigsService { + rs := &ProjectsLocationsKmsConfigsService{s: s} + return rs +} + +type ProjectsLocationsKmsConfigsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsStoragePoolsService(s *Service) *ProjectsLocationsStoragePoolsService { + rs := &ProjectsLocationsStoragePoolsService{s: s} + return rs +} + +type ProjectsLocationsStoragePoolsService struct { + s *Service +} + +func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesService { + rs := &ProjectsLocationsVolumesService{s: s} + rs.Replications = NewProjectsLocationsVolumesReplicationsService(s) + rs.Snapshots = NewProjectsLocationsVolumesSnapshotsService(s) + return rs +} + +type ProjectsLocationsVolumesService struct { + s *Service + + Replications *ProjectsLocationsVolumesReplicationsService + + Snapshots *ProjectsLocationsVolumesSnapshotsService +} + +func NewProjectsLocationsVolumesReplicationsService(s *Service) *ProjectsLocationsVolumesReplicationsService { + rs := &ProjectsLocationsVolumesReplicationsService{s: s} + return rs +} + +type ProjectsLocationsVolumesReplicationsService struct { + s *Service +} + +func NewProjectsLocationsVolumesSnapshotsService(s *Service) *ProjectsLocationsVolumesSnapshotsService { + rs := &ProjectsLocationsVolumesSnapshotsService{s: s} + return rs +} + +type ProjectsLocationsVolumesSnapshotsService struct { + s *Service +} + +// ActiveDirectory: ActiveDirectory is the public representation of the active +// directory config. +type ActiveDirectory struct { + // Administrators: Optional. Users to be added to the Built-in Admininstrators + // group. + Administrators []string `json:"administrators,omitempty"` + // AesEncryption: If enabled, AES encryption will be enabled for SMB + // communication. + AesEncryption bool `json:"aesEncryption,omitempty"` + // BackupOperators: Optional. Users to be added to the Built-in Backup Operator + // active directory group. + BackupOperators []string `json:"backupOperators,omitempty"` + // CreateTime: Output only. Create time of the active directory. + CreateTime string `json:"createTime,omitempty"` + // Description: Description of the active directory. + Description string `json:"description,omitempty"` + // Dns: Required. Comma separated list of DNS server IP addresses for the + // Active Directory domain. + Dns string `json:"dns,omitempty"` + // Domain: Required. Name of the Active Directory domain + Domain string `json:"domain,omitempty"` + // EncryptDcConnections: If enabled, traffic between the SMB server to Domain + // Controller (DC) will be encrypted. + EncryptDcConnections bool `json:"encryptDcConnections,omitempty"` + // KdcHostname: Name of the active directory machine. This optional parameter + // is used only while creating kerberos volume + KdcHostname string `json:"kdcHostname,omitempty"` + // KdcIp: KDC server IP address for the active directory machine. + KdcIp string `json:"kdcIp,omitempty"` + // Labels: Labels for the active directory. + Labels map[string]string `json:"labels,omitempty"` + // LdapSigning: Specifies whether or not the LDAP traffic needs to be signed. + LdapSigning bool `json:"ldapSigning,omitempty"` + // Name: Identifier. The resource name of the active directory. Format: + // `projects/{project_number}/locations/{location_id}/activeDirectories/{active_ + // directory_id}`. + Name string `json:"name,omitempty"` + // NetBiosPrefix: Required. NetBIOSPrefix is used as a prefix for SMB server + // name. + NetBiosPrefix string `json:"netBiosPrefix,omitempty"` + // NfsUsersWithLdap: If enabled, will allow access to local users and LDAP + // users. If access is needed for only LDAP users, it has to be disabled. + NfsUsersWithLdap bool `json:"nfsUsersWithLdap,omitempty"` + // OrganizationalUnit: The Organizational Unit (OU) within the Windows Active + // Directory the user belongs to. + OrganizationalUnit string `json:"organizationalUnit,omitempty"` + // Password: Required. Password of the Active Directory domain administrator. + Password string `json:"password,omitempty"` + // SecurityOperators: Optional. Domain users to be given the + // SeSecurityPrivilege. + SecurityOperators []string `json:"securityOperators,omitempty"` + // Site: The Active Directory site the service will limit Domain Controller + // discovery too. + Site string `json:"site,omitempty"` + // State: Output only. The state of the AD. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified Active Directory State + // "CREATING" - Active Directory State is Creating + // "READY" - Active Directory State is Ready + // "UPDATING" - Active Directory State is Updating + // "IN_USE" - Active Directory State is In use + // "DELETING" - Active Directory State is Deleting + // "ERROR" - Active Directory State is Error + // "DIAGNOSING" - Active Directory State is Diagnosing. + State string `json:"state,omitempty"` + // StateDetails: Output only. The state details of the Active Directory. + StateDetails string `json:"stateDetails,omitempty"` + // Username: Required. Username of the Active Directory domain administrator. + Username string `json:"username,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Administrators") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Administrators") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ActiveDirectory) MarshalJSON() ([]byte, error) { + type NoMethod ActiveDirectory + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AssetLocation: Provides the mapping of a cloud asset to a direct physical +// location or to a proxy that defines the location on its behalf. +type AssetLocation struct { + // CcfeRmsPath: Spanner path of the CCFE RMS database. It is only applicable + // for CCFE tenants that use CCFE RMS for storing resource metadata. + CcfeRmsPath string `json:"ccfeRmsPath,omitempty"` + // Expected: Defines the customer expectation around ZI/ZS for this asset and + // ZI/ZS state of the region at the time of asset creation. + Expected *IsolationExpectations `json:"expected,omitempty"` + // ExtraParameters: Defines extra parameters required for specific asset types. + ExtraParameters []*ExtraParameter `json:"extraParameters,omitempty"` + // LocationData: Contains all kinds of physical location definitions for this + // asset. + LocationData []*LocationData `json:"locationData,omitempty"` + // ParentAsset: Defines parents assets if any in order to allow later + // generation of child_asset_location data via child assets. + ParentAsset []*CloudAsset `json:"parentAsset,omitempty"` + // ForceSendFields is a list of field names (e.g. "CcfeRmsPath") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CcfeRmsPath") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AssetLocation) MarshalJSON() ([]byte, error) { + type NoMethod AssetLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Backup: A NetApp Backup. +type Backup struct { + // BackupType: Output only. Type of backup, manually created or created by a + // backup policy. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified backup type. + // "MANUAL" - Manual backup type. + // "SCHEDULED" - Scheduled backup type. + BackupType string `json:"backupType,omitempty"` + // ChainStorageBytes: Output only. Total size of all backups in a chain in + // bytes = baseline backup size + sum(incremental backup size) + ChainStorageBytes int64 `json:"chainStorageBytes,omitempty,string"` + // CreateTime: Output only. The time when the backup was created. + CreateTime string `json:"createTime,omitempty"` + // Description: A description of the backup with 2048 characters or less. + // Requests with longer descriptions will be rejected. + Description string `json:"description,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the backup. Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/ba + // ckups/{backup_id}`. + Name string `json:"name,omitempty"` + // SourceSnapshot: If specified, backup will be created from the given + // snapshot. If not specified, there will be a new snapshot taken to initiate + // the backup creation. Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{sn + // apshot_id}` + SourceSnapshot string `json:"sourceSnapshot,omitempty"` + // SourceVolume: Volume full name of this backup belongs to. Format: + // `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + SourceVolume string `json:"sourceVolume,omitempty"` + // State: Output only. The backup state. + // + // Possible values: + // "STATE_UNSPECIFIED" - State not set. + // "CREATING" - Backup is being created. While in this state, the snapshot + // for the backup point-in-time may not have been created yet, and so the + // point-in-time may not have been fixed. + // "UPLOADING" - Backup is being uploaded. While in this state, none of the + // writes to the volume will be included in the backup. + // "READY" - Backup is available for use. + // "DELETING" - Backup is being deleted. + // "ERROR" - Backup is not valid and cannot be used for creating new volumes + // or restoring existing volumes. + // "UPDATING" - Backup is being updated. + State string `json:"state,omitempty"` + // VolumeUsageBytes: Output only. Size of the file system when the backup was + // created. When creating a new volume from the backup, the volume capacity + // will have to be at least as big. + VolumeUsageBytes int64 `json:"volumeUsageBytes,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BackupType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Backup) MarshalJSON() ([]byte, error) { + type NoMethod Backup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupConfig: BackupConfig contains backup related config on a volume. +type BackupConfig struct { + // BackupChainBytes: Output only. Total size of all backups in a chain in bytes + // = baseline backup size + sum(incremental backup size). + BackupChainBytes int64 `json:"backupChainBytes,omitempty,string"` + // BackupPolicies: Optional. When specified, schedule backups will be created + // based on the policy configuration. + BackupPolicies []string `json:"backupPolicies,omitempty"` + // BackupVault: Optional. Name of backup vault. Format: + // projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + BackupVault string `json:"backupVault,omitempty"` + // ScheduledBackupEnabled: Optional. When set to true, scheduled backup is + // enabled on the volume. This field should be nil when there's no backup + // policy attached. + ScheduledBackupEnabled bool `json:"scheduledBackupEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupChainBytes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupChainBytes") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupConfig) MarshalJSON() ([]byte, error) { + type NoMethod BackupConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupPolicy: Backup Policy. +type BackupPolicy struct { + // AssignedVolumeCount: Output only. The total number of volumes assigned by + // this backup policy. + AssignedVolumeCount int64 `json:"assignedVolumeCount,omitempty"` + // CreateTime: Output only. The time when the backup policy was created. + CreateTime string `json:"createTime,omitempty"` + // DailyBackupLimit: Number of daily backups to keep. Note that the minimum + // daily backup limit is 2. + DailyBackupLimit int64 `json:"dailyBackupLimit,omitempty"` + // Description: Description of the backup policy. + Description string `json:"description,omitempty"` + // Enabled: If enabled, make backups automatically according to the schedules. + // This will be applied to all volumes that have this policy attached and + // enforced on volume level. If not specified, default is true. + Enabled bool `json:"enabled,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // MonthlyBackupLimit: Number of monthly backups to keep. Note that the sum of + // daily, weekly and monthly backups should be greater than 1. + MonthlyBackupLimit int64 `json:"monthlyBackupLimit,omitempty"` + // Name: Identifier. The resource name of the backup policy. Format: + // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id} + // `. + Name string `json:"name,omitempty"` + // State: Output only. The backup policy state. + // + // Possible values: + // "STATE_UNSPECIFIED" - State not set. + // "CREATING" - BackupPolicy is being created. + // "READY" - BackupPolicy is available for use. + // "DELETING" - BackupPolicy is being deleted. + // "ERROR" - BackupPolicy is not valid and cannot be used. + // "UPDATING" - BackupPolicy is being updated. + State string `json:"state,omitempty"` + // WeeklyBackupLimit: Number of weekly backups to keep. Note that the sum of + // daily, weekly and monthly backups should be greater than 1. + WeeklyBackupLimit int64 `json:"weeklyBackupLimit,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AssignedVolumeCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssignedVolumeCount") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupPolicy) MarshalJSON() ([]byte, error) { + type NoMethod BackupPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupVault: A NetApp BackupVault. +type BackupVault struct { + // CreateTime: Output only. Create time of the backup vault. + CreateTime string `json:"createTime,omitempty"` + // Description: Description of the backup vault. + Description string `json:"description,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the backup vault. Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + Name string `json:"name,omitempty"` + // State: Output only. The backup vault state. + // + // Possible values: + // "STATE_UNSPECIFIED" - State not set. + // "CREATING" - BackupVault is being created. + // "READY" - BackupVault is available for use. + // "DELETING" - BackupVault is being deleted. + // "ERROR" - BackupVault is not valid and cannot be used. + // "UPDATING" - BackupVault is being updated. + State string `json:"state,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupVault) MarshalJSON() ([]byte, error) { + type NoMethod BackupVault + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BlobstoreLocation: Policy ID that identified data placement in Blobstore as +// per go/blobstore-user-guide#data-metadata-placement-and-failure-domains +type BlobstoreLocation struct { + PolicyId []string `json:"policyId,omitempty"` + // ForceSendFields is a list of field names (e.g. "PolicyId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PolicyId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BlobstoreLocation) MarshalJSON() ([]byte, error) { + type NoMethod BlobstoreLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + +type CloudAsset struct { + AssetName string `json:"assetName,omitempty"` + AssetType string `json:"assetType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssetName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssetName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudAsset) MarshalJSON() ([]byte, error) { + type NoMethod CloudAsset + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudAssetComposition struct { + ChildAsset []*CloudAsset `json:"childAsset,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChildAsset") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChildAsset") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudAssetComposition) MarshalJSON() ([]byte, error) { + type NoMethod CloudAssetComposition + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DailySchedule: Make a snapshot every day e.g. at 04:00, 05:20, 23:50 +type DailySchedule struct { + // Hour: Set the hour to start the snapshot (0-23), defaults to midnight (0). + Hour float64 `json:"hour,omitempty"` + // Minute: Set the minute of the hour to start the snapshot (0-59), defaults to + // the top of the hour (0). + Minute float64 `json:"minute,omitempty"` + // SnapshotsToKeep: The maximum number of Snapshots to keep for the hourly + // schedule + SnapshotsToKeep float64 `json:"snapshotsToKeep,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Hour") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DailySchedule) MarshalJSON() ([]byte, error) { + type NoMethod DailySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *DailySchedule) UnmarshalJSON(data []byte) error { + type NoMethod DailySchedule + var s1 struct { + Hour gensupport.JSONFloat64 `json:"hour"` + Minute gensupport.JSONFloat64 `json:"minute"` + SnapshotsToKeep gensupport.JSONFloat64 `json:"snapshotsToKeep"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Hour = float64(s1.Hour) + s.Minute = float64(s1.Minute) + s.SnapshotsToKeep = float64(s1.SnapshotsToKeep) + return nil +} + +// DestinationVolumeParameters: DestinationVolumeParameters specify input +// parameters used for creating destination volume. +type DestinationVolumeParameters struct { + // Description: Description for the destination volume. + Description string `json:"description,omitempty"` + // ShareName: Destination volume's share name. If not specified, source + // volume's share name will be used. + ShareName string `json:"shareName,omitempty"` + // StoragePool: Required. Existing destination StoragePool name. + StoragePool string `json:"storagePool,omitempty"` + // VolumeId: Desired destination volume resource id. If not specified, source + // volume's resource id will be used. This value must start with a lowercase + // letter followed by up to 62 lowercase letters, numbers, or hyphens, and + // cannot end with a hyphen. + VolumeId string `json:"volumeId,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DestinationVolumeParameters) MarshalJSON() ([]byte, error) { + type NoMethod DestinationVolumeParameters + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type DirectLocationAssignment struct { + Location []*LocationAssignment `json:"location,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Location") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DirectLocationAssignment) MarshalJSON() ([]byte, error) { + type NoMethod DirectLocationAssignment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// EncryptVolumesRequest: EncryptVolumesRequest specifies the KMS config to +// encrypt existing volumes. +type EncryptVolumesRequest struct { +} + +// ExportPolicy: Defines the export policy for the volume. +type ExportPolicy struct { + // Rules: Required. List of export policy rules + Rules []*SimpleExportPolicyRule `json:"rules,omitempty"` + // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Rules") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ExportPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ExtraParameter: Defines parameters that should only be used for specific +// asset types. +type ExtraParameter struct { + // RegionalMigDistributionPolicy: Details about zones used by regional + // compute.googleapis.com/InstanceGroupManager to create instances. + RegionalMigDistributionPolicy *RegionalMigDistributionPolicy `json:"regionalMigDistributionPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RegionalMigDistributionPolicy") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RegionalMigDistributionPolicy") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExtraParameter) MarshalJSON() ([]byte, error) { + type NoMethod ExtraParameter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: 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 GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// HourlySchedule: Make a snapshot every hour e.g. at 04:00, 05:00, 06:00. +type HourlySchedule struct { + // Minute: Set the minute of the hour to start the snapshot (0-59), defaults to + // the top of the hour (0). + Minute float64 `json:"minute,omitempty"` + // SnapshotsToKeep: The maximum number of Snapshots to keep for the hourly + // schedule + SnapshotsToKeep float64 `json:"snapshotsToKeep,omitempty"` + // ForceSendFields is a list of field names (e.g. "Minute") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Minute") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s HourlySchedule) MarshalJSON() ([]byte, error) { + type NoMethod HourlySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *HourlySchedule) UnmarshalJSON(data []byte) error { + type NoMethod HourlySchedule + var s1 struct { + Minute gensupport.JSONFloat64 `json:"minute"` + SnapshotsToKeep gensupport.JSONFloat64 `json:"snapshotsToKeep"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Minute = float64(s1.Minute) + s.SnapshotsToKeep = float64(s1.SnapshotsToKeep) + return nil +} + +type IsolationExpectations struct { + // RequirementOverride: Explicit overrides for ZI and ZS requirements to be + // used for resources that should be excluded from ZI/ZS verification logic. + RequirementOverride *RequirementOverride `json:"requirementOverride,omitempty"` + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZiOrgPolicy string `json:"ziOrgPolicy,omitempty"` + // Possible values: + // "ZI_REGION_POLICY_UNSPECIFIED" + // "ZI_REGION_POLICY_UNKNOWN" - To be used if tracking is not available + // "ZI_REGION_POLICY_NOT_SET" + // "ZI_REGION_POLICY_FAIL_OPEN" + // "ZI_REGION_POLICY_FAIL_CLOSED" + ZiRegionPolicy string `json:"ziRegionPolicy,omitempty"` + // Possible values: + // "ZI_REGION_UNSPECIFIED" + // "ZI_REGION_UNKNOWN" - To be used if tracking is not available + // "ZI_REGION_NOT_ENABLED" + // "ZI_REGION_ENABLED" + ZiRegionState string `json:"ziRegionState,omitempty"` + // ZoneIsolation: Deprecated: use zi_org_policy, zi_region_policy and + // zi_region_state instead for setting ZI expectations as per + // go/zicy-publish-physical-location. + // + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZoneIsolation string `json:"zoneIsolation,omitempty"` + // ZoneSeparation: Deprecated: use zs_org_policy, and zs_region_stateinstead + // for setting Zs expectations as per go/zicy-publish-physical-location. + // + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZoneSeparation string `json:"zoneSeparation,omitempty"` + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZsOrgPolicy string `json:"zsOrgPolicy,omitempty"` + // Possible values: + // "ZS_REGION_UNSPECIFIED" + // "ZS_REGION_UNKNOWN" - To be used if tracking of the asset ZS-bit is not + // available + // "ZS_REGION_NOT_ENABLED" + // "ZS_REGION_ENABLED" + ZsRegionState string `json:"zsRegionState,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequirementOverride") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RequirementOverride") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s IsolationExpectations) MarshalJSON() ([]byte, error) { + type NoMethod IsolationExpectations + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// KmsConfig: KmsConfig is the customer managed encryption key(CMEK) +// configuration. +type KmsConfig struct { + // CreateTime: Output only. Create time of the KmsConfig. + CreateTime string `json:"createTime,omitempty"` + // CryptoKeyName: Required. Customer managed crypto key resource full name. + // Format: + // projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + CryptoKeyName string `json:"cryptoKeyName,omitempty"` + // Description: Description of the KmsConfig. + Description string `json:"description,omitempty"` + // Instructions: Output only. Instructions to provide the access to the + // customer provided encryption key. + Instructions string `json:"instructions,omitempty"` + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. Name of the KmsConfig. + Name string `json:"name,omitempty"` + // ServiceAccount: Output only. The Service account which will have access to + // the customer provided encryption key. + ServiceAccount string `json:"serviceAccount,omitempty"` + // State: Output only. State of the KmsConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified KmsConfig State + // "READY" - KmsConfig State is Ready + // "CREATING" - KmsConfig State is Creating + // "DELETING" - KmsConfig State is Deleting + // "UPDATING" - KmsConfig State is Updating + // "IN_USE" - KmsConfig State is In Use. + // "ERROR" - KmsConfig State is Error + // "KEY_CHECK_PENDING" - KmsConfig State is Pending to verify crypto key + // access. + // "KEY_NOT_REACHABLE" - KmsConfig State is Not accessbile by the SDE service + // account to the crypto key. + // "DISABLING" - KmsConfig State is Disabling. + // "DISABLED" - KmsConfig State is Disabled. + // "MIGRATING" - KmsConfig State is Migrating. The existing volumes are + // migrating from SMEK to CMEK. + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the KmsConfig. + StateDetails string `json:"stateDetails,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s KmsConfig) MarshalJSON() ([]byte, error) { + type NoMethod KmsConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListActiveDirectoriesResponse: ListActiveDirectoriesResponse contains all +// the active directories requested. +type ListActiveDirectoriesResponse struct { + // ActiveDirectories: The list of active directories. + ActiveDirectories []*ActiveDirectory `json:"activeDirectories,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. "ActiveDirectories") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveDirectories") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListActiveDirectoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListActiveDirectoriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListBackupPoliciesResponse: ListBackupPoliciesResponse contains all the +// backup policies requested. +type ListBackupPoliciesResponse struct { + // BackupPolicies: The list of backup policies. + BackupPolicies []*BackupPolicy `json:"backupPolicies,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. "BackupPolicies") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupPolicies") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupPoliciesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListBackupVaultsResponse: ListBackupVaultsResponse is the result of +// ListBackupVaultsRequest. +type ListBackupVaultsResponse struct { + // BackupVaults: A list of backupVaults in the project for the specified + // location. + BackupVaults []*BackupVault `json:"backupVaults,omitempty"` + // NextPageToken: The token you can use to retrieve the next page of results. + // Not returned if there are no more results in the list. + 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. "BackupVaults") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupVaults") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupVaultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupVaultsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListBackupsResponse: ListBackupsResponse is the result of +// ListBackupsRequest. +type ListBackupsResponse struct { + // Backups: A list of backups in the project. + Backups []*Backup `json:"backups,omitempty"` + // NextPageToken: The token you can use to retrieve the next page of results. + // Not returned if there are no more results in the list. + 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. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListKmsConfigsResponse: ListKmsConfigsResponse is the response to a +// ListKmsConfigsRequest. +type ListKmsConfigsResponse struct { + // KmsConfigs: The list of KmsConfigs + KmsConfigs []*KmsConfig `json:"kmsConfigs,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. "KmsConfigs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "KmsConfigs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListKmsConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListKmsConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListReplicationsResponse: ListReplicationsResponse is the result of +// ListReplicationsRequest. +type ListReplicationsResponse struct { + // NextPageToken: The token you can use to retrieve the next page of results. + // Not returned if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Replications: A list of replications in the project for the specified + // volume. + Replications []*Replication `json:"replications,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. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListReplicationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListReplicationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListSnapshotsResponse: ListSnapshotsResponse is the result of +// ListSnapshotsRequest. +type ListSnapshotsResponse struct { + // NextPageToken: The token you can use to retrieve the next page of results. + // Not returned if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Snapshots: A list of snapshots in the project for the specified volume. + Snapshots []*Snapshot `json:"snapshots,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. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListSnapshotsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSnapshotsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListStoragePoolsResponse: ListStoragePoolsResponse is the response to a +// ListStoragePoolsRequest. +type ListStoragePoolsResponse struct { + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // StoragePools: The list of StoragePools + StoragePools []*StoragePool `json:"storagePools,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. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListStoragePoolsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListStoragePoolsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListVolumesResponse: Message for response to listing Volumes +type ListVolumesResponse struct { + // 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"` + // Volumes: The list of Volume + Volumes []*Volume `json:"volumes,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListVolumesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListVolumesResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type LocationAssignment struct { + Location string `json:"location,omitempty"` + // Possible values: + // "UNSPECIFIED" + // "CLUSTER" - 1-10: Physical failure domains. + // "POP" + // "CLOUD_ZONE" - 11-20: Logical failure domains. + // "CLOUD_REGION" + // "MULTI_REGION_GEO" + // "MULTI_REGION_JURISDICTION" + // "GLOBAL" + // "OTHER" + LocationType string `json:"locationType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Location") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LocationAssignment) MarshalJSON() ([]byte, error) { + type NoMethod LocationAssignment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type LocationData struct { + BlobstoreLocation *BlobstoreLocation `json:"blobstoreLocation,omitempty"` + ChildAssetLocation *CloudAssetComposition `json:"childAssetLocation,omitempty"` + DirectLocation *DirectLocationAssignment `json:"directLocation,omitempty"` + GcpProjectProxy *TenantProjectProxy `json:"gcpProjectProxy,omitempty"` + PlacerLocation *PlacerLocation `json:"placerLocation,omitempty"` + SpannerLocation *SpannerLocation `json:"spannerLocation,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlobstoreLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlobstoreLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LocationData) MarshalJSON() ([]byte, error) { + type NoMethod LocationData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// LocationMetadata: Metadata for a given google.cloud.location.Location. +type LocationMetadata struct { + // SupportedServiceLevels: Output only. Supported service levels in a location. + // + // Possible values: + // "SERVICE_LEVEL_UNSPECIFIED" - Unspecified service level. + // "PREMIUM" - Premium service level. + // "EXTREME" - Extreme service level. + // "STANDARD" - Standard service level. + // "FLEX" - Flex service level. + SupportedServiceLevels []string `json:"supportedServiceLevels,omitempty"` + // ForceSendFields is a list of field names (e.g. "SupportedServiceLevels") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SupportedServiceLevels") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod LocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MonthlySchedule: Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, +// 24th 23:50 +type MonthlySchedule struct { + // DaysOfMonth: Set the day or days of the month to make a snapshot (1-31). + // Accepts a comma separated number of days. Defaults to '1'. + DaysOfMonth string `json:"daysOfMonth,omitempty"` + // Hour: Set the hour to start the snapshot (0-23), defaults to midnight (0). + Hour float64 `json:"hour,omitempty"` + // Minute: Set the minute of the hour to start the snapshot (0-59), defaults to + // the top of the hour (0). + Minute float64 `json:"minute,omitempty"` + // SnapshotsToKeep: The maximum number of Snapshots to keep for the hourly + // schedule + SnapshotsToKeep float64 `json:"snapshotsToKeep,omitempty"` + // ForceSendFields is a list of field names (e.g. "DaysOfMonth") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DaysOfMonth") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MonthlySchedule) MarshalJSON() ([]byte, error) { + type NoMethod MonthlySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *MonthlySchedule) UnmarshalJSON(data []byte) error { + type NoMethod MonthlySchedule + var s1 struct { + Hour gensupport.JSONFloat64 `json:"hour"` + Minute gensupport.JSONFloat64 `json:"minute"` + SnapshotsToKeep gensupport.JSONFloat64 `json:"snapshotsToKeep"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Hour = float64(s1.Hour) + s.Minute = float64(s1.Minute) + s.SnapshotsToKeep = float64(s1.SnapshotsToKeep) + return nil +} + +// MountOption: View only mount options for a volume. +type MountOption struct { + // Export: Export string + Export string `json:"export,omitempty"` + // ExportFull: Full export string + ExportFull string `json:"exportFull,omitempty"` + // Instructions: Instructions for mounting + Instructions string `json:"instructions,omitempty"` + // Protocol: Protocol to mount with. + // + // Possible values: + // "PROTOCOLS_UNSPECIFIED" - Unspecified protocol + // "NFSV3" - NFS V3 protocol + // "NFSV4" - NFS V4 protocol + // "SMB" - SMB protocol + Protocol string `json:"protocol,omitempty"` + // ForceSendFields is a list of field names (e.g. "Export") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Export") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MountOption) MarshalJSON() ([]byte, error) { + type NoMethod MountOption + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(s), 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 been canceled + // successfully 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PlacerLocation: Message describing that the location of the customer +// resource is tied to placer allocations +type PlacerLocation struct { + // PlacerConfig: Directory with a config related to it in placer (e.g. + // "/placer/prod/home/my-root/my-dir") + PlacerConfig string `json:"placerConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PlacerConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PlacerConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PlacerLocation) MarshalJSON() ([]byte, error) { + type NoMethod PlacerLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RegionalMigDistributionPolicy: To be used for specifying the intended +// distribution of regional compute.googleapis.com/InstanceGroupManager +// instances +type RegionalMigDistributionPolicy struct { + // TargetShape: The shape in which the group converges around distribution of + // resources. Instance of proto2 enum + TargetShape int64 `json:"targetShape,omitempty"` + // Zones: Cloud zones used by regional MIG to create instances. + Zones []*ZoneConfiguration `json:"zones,omitempty"` + // ForceSendFields is a list of field names (e.g. "TargetShape") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TargetShape") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RegionalMigDistributionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RegionalMigDistributionPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Replication: Replication is a nested resource under Volume, that describes a +// cross-region replication relationship between 2 volumes in different +// regions. +type Replication struct { + // CreateTime: Output only. Replication create time. + CreateTime string `json:"createTime,omitempty"` + // Description: A description about this replication relationship. + Description string `json:"description,omitempty"` + // DestinationVolume: Output only. Full name of destination volume resource. + // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + DestinationVolume string `json:"destinationVolume,omitempty"` + // DestinationVolumeParameters: Required. Input only. Destination volume + // parameters + DestinationVolumeParameters *DestinationVolumeParameters `json:"destinationVolumeParameters,omitempty"` + // Healthy: Output only. Condition of the relationship. Can be one of the + // following: - true: The replication relationship is healthy. It has not + // missed the most recent scheduled transfer. - false: The replication + // relationship is not healthy. It has missed the most recent scheduled + // transfer. + Healthy bool `json:"healthy,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // MirrorState: Output only. Indicates the state of mirroring. + // + // Possible values: + // "MIRROR_STATE_UNSPECIFIED" - Unspecified MirrorState + // "PREPARING" - Destination volume is being prepared. + // "MIRRORED" - Destination volume has been initialized and is ready to + // receive replication transfers. + // "STOPPED" - Destination volume is not receiving replication transfers. + // "TRANSFERRING" - Incremental replication is in progress. + MirrorState string `json:"mirrorState,omitempty"` + // Name: Identifier. The resource name of the Replication. Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/ + // {replication_id}`. + Name string `json:"name,omitempty"` + // ReplicationSchedule: Required. Indicates the schedule for replication. + // + // Possible values: + // "REPLICATION_SCHEDULE_UNSPECIFIED" - Unspecified ReplicationSchedule + // "EVERY_10_MINUTES" - Replication happens once every 10 minutes. + // "HOURLY" - Replication happens once every hour. + // "DAILY" - Replication happens once every day. + ReplicationSchedule string `json:"replicationSchedule,omitempty"` + // Role: Output only. Indicates whether this points to source or destination. + // + // Possible values: + // "REPLICATION_ROLE_UNSPECIFIED" - Unspecified replication role + // "SOURCE" - Indicates Source volume. + // "DESTINATION" - Indicates Destination volume. + Role string `json:"role,omitempty"` + // SourceVolume: Output only. Full name of source volume resource. Example : + // "projects/{project}/locations/{location}/volumes/{volume_id}" + SourceVolume string `json:"sourceVolume,omitempty"` + // State: Output only. State of the replication. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified replication State + // "CREATING" - Replication is creating. + // "READY" - Replication is ready. + // "UPDATING" - Replication is updating. + // "DELETING" - Replication is deleting. + // "ERROR" - Replication is in error state. + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the replication. + StateDetails string `json:"stateDetails,omitempty"` + // TransferStats: Output only. Replication transfer statistics. + TransferStats *TransferStats `json:"transferStats,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Replication) MarshalJSON() ([]byte, error) { + type NoMethod Replication + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RequirementOverride struct { + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZiOverride string `json:"ziOverride,omitempty"` + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZsOverride string `json:"zsOverride,omitempty"` + // ForceSendFields is a list of field names (e.g. "ZiOverride") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ZiOverride") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RequirementOverride) MarshalJSON() ([]byte, error) { + type NoMethod RequirementOverride + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RestoreParameters: The RestoreParameters if volume is created from a +// snapshot or backup. +type RestoreParameters struct { + // SourceBackup: Full name of the backup resource. Format: + // projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backup + // s/{backup_id} + SourceBackup string `json:"sourceBackup,omitempty"` + // SourceSnapshot: Full name of the snapshot resource. Format: + // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + SourceSnapshot string `json:"sourceSnapshot,omitempty"` + // ForceSendFields is a list of field names (e.g. "SourceBackup") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SourceBackup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RestoreParameters) MarshalJSON() ([]byte, error) { + type NoMethod RestoreParameters + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ResumeReplicationRequest: ResumeReplicationRequest resumes a stopped +// replication. +type ResumeReplicationRequest struct { +} + +// ReverseReplicationDirectionRequest: ReverseReplicationDirectionRequest +// reverses direction of replication. Source becomes destination and +// destination becomes source. +type ReverseReplicationDirectionRequest struct { +} + +// RevertVolumeRequest: RevertVolumeRequest reverts the given volume to the +// specified snapshot. +type RevertVolumeRequest struct { + // SnapshotId: Required. The snapshot resource ID, in the format 'my-snapshot', + // where the specified ID is the {snapshot_id} of the fully qualified name like + // projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{ + // snapshot_id} + SnapshotId string `json:"snapshotId,omitempty"` + // ForceSendFields is a list of field names (e.g. "SnapshotId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SnapshotId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RevertVolumeRequest) MarshalJSON() ([]byte, error) { + type NoMethod RevertVolumeRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SimpleExportPolicyRule: An export policy rule describing various export +// options. +type SimpleExportPolicyRule struct { + // AccessType: Access type (ReadWrite, ReadOnly, None) + // + // Possible values: + // "ACCESS_TYPE_UNSPECIFIED" - Unspecified Access Type + // "READ_ONLY" - Read Only + // "READ_WRITE" - Read Write + // "READ_NONE" - None + AccessType string `json:"accessType,omitempty"` + // AllowedClients: Comma separated list of allowed clients IP addresses + AllowedClients string `json:"allowedClients,omitempty"` + // HasRootAccess: Whether Unix root access will be granted. + HasRootAccess string `json:"hasRootAccess,omitempty"` + // Kerberos5ReadOnly: If enabled (true) the rule defines a read only access for + // clients matching the 'allowedClients' specification. It enables nfs clients + // to mount using 'authentication' kerberos security mode. + Kerberos5ReadOnly bool `json:"kerberos5ReadOnly,omitempty"` + // Kerberos5ReadWrite: If enabled (true) the rule defines read and write access + // for clients matching the 'allowedClients' specification. It enables nfs + // clients to mount using 'authentication' kerberos security mode. The + // 'kerberos5ReadOnly' value be ignored if this is enabled. + Kerberos5ReadWrite bool `json:"kerberos5ReadWrite,omitempty"` + // Kerberos5iReadOnly: If enabled (true) the rule defines a read only access + // for clients matching the 'allowedClients' specification. It enables nfs + // clients to mount using 'integrity' kerberos security mode. + Kerberos5iReadOnly bool `json:"kerberos5iReadOnly,omitempty"` + // Kerberos5iReadWrite: If enabled (true) the rule defines read and write + // access for clients matching the 'allowedClients' specification. It enables + // nfs clients to mount using 'integrity' kerberos security mode. The + // 'kerberos5iReadOnly' value be ignored if this is enabled. + Kerberos5iReadWrite bool `json:"kerberos5iReadWrite,omitempty"` + // Kerberos5pReadOnly: If enabled (true) the rule defines a read only access + // for clients matching the 'allowedClients' specification. It enables nfs + // clients to mount using 'privacy' kerberos security mode. + Kerberos5pReadOnly bool `json:"kerberos5pReadOnly,omitempty"` + // Kerberos5pReadWrite: If enabled (true) the rule defines read and write + // access for clients matching the 'allowedClients' specification. It enables + // nfs clients to mount using 'privacy' kerberos security mode. The + // 'kerberos5pReadOnly' value be ignored if this is enabled. + Kerberos5pReadWrite bool `json:"kerberos5pReadWrite,omitempty"` + // Nfsv3: NFS V3 protocol. + Nfsv3 bool `json:"nfsv3,omitempty"` + // Nfsv4: NFS V4 protocol. + Nfsv4 bool `json:"nfsv4,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccessType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccessType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SimpleExportPolicyRule) MarshalJSON() ([]byte, error) { + type NoMethod SimpleExportPolicyRule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Snapshot: Snapshot is a point-in-time version of a Volume's content. +type Snapshot struct { + // CreateTime: Output only. The time when the snapshot was created. + CreateTime string `json:"createTime,omitempty"` + // Description: A description of the snapshot with 2048 characters or less. + // Requests with longer descriptions will be rejected. + Description string `json:"description,omitempty"` + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the snapshot. Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{sn + // apshot_id}`. + Name string `json:"name,omitempty"` + // State: Output only. The snapshot state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified Snapshot State + // "READY" - Snapshot State is Ready + // "CREATING" - Snapshot State is Creating + // "DELETING" - Snapshot State is Deleting + // "UPDATING" - Snapshot State is Updating + // "DISABLED" - Snapshot State is Disabled + // "ERROR" - Snapshot State is Error + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the storage pool + StateDetails string `json:"stateDetails,omitempty"` + // UsedBytes: Output only. Current storage usage for the snapshot in bytes. + UsedBytes float64 `json:"usedBytes,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Snapshot) MarshalJSON() ([]byte, error) { + type NoMethod Snapshot + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *Snapshot) UnmarshalJSON(data []byte) error { + type NoMethod Snapshot + var s1 struct { + UsedBytes gensupport.JSONFloat64 `json:"usedBytes"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.UsedBytes = float64(s1.UsedBytes) + return nil +} + +// SnapshotPolicy: Snapshot Policy for a volume. +type SnapshotPolicy struct { + // DailySchedule: Daily schedule policy. + DailySchedule *DailySchedule `json:"dailySchedule,omitempty"` + // Enabled: If enabled, make snapshots automatically according to the + // schedules. Default is false. + Enabled bool `json:"enabled,omitempty"` + // HourlySchedule: Hourly schedule policy. + HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"` + // MonthlySchedule: Monthly schedule policy. + MonthlySchedule *MonthlySchedule `json:"monthlySchedule,omitempty"` + // WeeklySchedule: Weekly schedule policy. + WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` + // ForceSendFields is a list of field names (e.g. "DailySchedule") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DailySchedule") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SnapshotPolicy) MarshalJSON() ([]byte, error) { + type NoMethod SnapshotPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type SpannerLocation struct { + // BackupName: Set of backups used by the resource with name in the same format + // as what is available at http://table/spanner_automon.backup_metadata + BackupName []string `json:"backupName,omitempty"` + // DbName: Set of databases used by the resource in format /span// + DbName []string `json:"dbName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SpannerLocation) MarshalJSON() ([]byte, error) { + type NoMethod SpannerLocation + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// StopReplicationRequest: StopReplicationRequest stops a replication until +// resumed. +type StopReplicationRequest struct { + // Force: Indicates whether to stop replication forcefully while data transfer + // is in progress. Warning! if force is true, this will abort any current + // transfers and can lead to data loss due to partial transfer. If force is + // false, stop replication will fail while data transfer is in progress and you + // will need to retry later. + Force bool `json:"force,omitempty"` + // ForceSendFields is a list of field names (e.g. "Force") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Force") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s StopReplicationRequest) MarshalJSON() ([]byte, error) { + type NoMethod StopReplicationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// StoragePool: StoragePool is a container for volumes with a service level and +// capacity. Volumes can be created in a pool of sufficient available capacity. +// StoragePool capacity is what you are billed for. +type StoragePool struct { + // ActiveDirectory: Optional. Specifies the Active Directory to be used for + // creating a SMB volume. + ActiveDirectory string `json:"activeDirectory,omitempty"` + // AllowAutoTiering: Optional. True if the storage pool supports Auto Tiering + // enabled volumes. Default is false. Auto-tiering can be enabled after storage + // pool creation but it can't be disabled once enabled. + AllowAutoTiering bool `json:"allowAutoTiering,omitempty"` + // CapacityGib: Required. Capacity in GIB of the pool + CapacityGib int64 `json:"capacityGib,omitempty,string"` + // CreateTime: Output only. Create time of the storage pool + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. Description of the storage pool + Description string `json:"description,omitempty"` + // EncryptionType: Output only. Specifies the current pool encryption key + // source. + // + // Possible values: + // "ENCRYPTION_TYPE_UNSPECIFIED" - The source of the encryption key is not + // specified. + // "SERVICE_MANAGED" - Google managed encryption key. + // "CLOUD_KMS" - Customer managed encryption key, which is stored in KMS. + EncryptionType string `json:"encryptionType,omitempty"` + // GlobalAccessAllowed: Deprecated. Used to allow SO pool to access AD or DNS + // server from other regions. + GlobalAccessAllowed bool `json:"globalAccessAllowed,omitempty"` + // KmsConfig: Optional. Specifies the KMS config to be used for volume + // encryption. + KmsConfig string `json:"kmsConfig,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // LdapEnabled: Optional. Flag indicating if the pool is NFS LDAP enabled or + // not. + LdapEnabled bool `json:"ldapEnabled,omitempty"` + // Name: Identifier. Name of the storage pool + Name string `json:"name,omitempty"` + // Network: Required. VPC Network name. Format: + // projects/{project}/global/networks/{network} + Network string `json:"network,omitempty"` + // PsaRange: Optional. This field is not implemented. The values provided in + // this field are ignored. + PsaRange string `json:"psaRange,omitempty"` + // ReplicaZone: Optional. Specifies the replica zone for regional storagePool. + ReplicaZone string `json:"replicaZone,omitempty"` + // ServiceLevel: Required. Service level of the storage pool + // + // Possible values: + // "SERVICE_LEVEL_UNSPECIFIED" - Unspecified service level. + // "PREMIUM" - Premium service level. + // "EXTREME" - Extreme service level. + // "STANDARD" - Standard service level. + // "FLEX" - Flex service level. + ServiceLevel string `json:"serviceLevel,omitempty"` + // State: Output only. State of the storage pool + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified Storage Pool State + // "READY" - Storage Pool State is Ready + // "CREATING" - Storage Pool State is Creating + // "DELETING" - Storage Pool State is Deleting + // "UPDATING" - Storage Pool State is Updating + // "RESTORING" - Storage Pool State is Restoring + // "DISABLED" - Storage Pool State is Disabled + // "ERROR" - Storage Pool State is Error + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the storage pool + StateDetails string `json:"stateDetails,omitempty"` + // VolumeCapacityGib: Output only. Allocated size of all volumes in GIB in the + // storage pool + VolumeCapacityGib int64 `json:"volumeCapacityGib,omitempty,string"` + // VolumeCount: Output only. Volume count of the storage pool + VolumeCount int64 `json:"volumeCount,omitempty"` + // Zone: Optional. Specifies the active zone for regional storagePool. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ActiveDirectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveDirectory") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s StoragePool) MarshalJSON() ([]byte, error) { + type NoMethod StoragePool + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SwitchActiveReplicaZoneRequest: SwitchActiveReplicaZoneRequest switch the +// active/replica zone for a regional storagePool. +type SwitchActiveReplicaZoneRequest struct { +} + +type TenantProjectProxy struct { + ProjectNumbers []string `json:"projectNumbers,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProjectNumbers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProjectNumbers") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TenantProjectProxy) MarshalJSON() ([]byte, error) { + type NoMethod TenantProjectProxy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TieringPolicy: Defines tiering policy for the volume. +type TieringPolicy struct { + // CoolingThresholdDays: Optional. Time in days to mark the volume's data block + // as cold and make it eligible for tiering, can be range from 7-183. Default + // is 31. + CoolingThresholdDays int64 `json:"coolingThresholdDays,omitempty"` + // TierAction: Optional. Flag indicating if the volume has tiering policy + // enable/pause. Default is PAUSED. + // + // Possible values: + // "TIER_ACTION_UNSPECIFIED" - Unspecified. + // "ENABLED" - When tiering is enabled, new cold data will be tiered. + // "PAUSED" - When paused, tiering won't be performed on new data. Existing + // data stays tiered until accessed. + TierAction string `json:"tierAction,omitempty"` + // ForceSendFields is a list of field names (e.g. "CoolingThresholdDays") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CoolingThresholdDays") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TieringPolicy) MarshalJSON() ([]byte, error) { + type NoMethod TieringPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TransferStats: TransferStats reports all statistics related to replication +// transfer. +type TransferStats struct { + // LagDuration: Lag duration indicates the duration by which Destination region + // volume content lags behind the primary region volume content. + LagDuration string `json:"lagDuration,omitempty"` + // LastTransferBytes: Last transfer size in bytes. + LastTransferBytes int64 `json:"lastTransferBytes,omitempty,string"` + // LastTransferDuration: Time taken during last transfer. + LastTransferDuration string `json:"lastTransferDuration,omitempty"` + // LastTransferEndTime: Time when last transfer completed. + LastTransferEndTime string `json:"lastTransferEndTime,omitempty"` + // LastTransferError: A message describing the cause of the last transfer + // failure. + LastTransferError string `json:"lastTransferError,omitempty"` + // TotalTransferDuration: Cumulative time taken across all transfers for the + // replication relationship. + TotalTransferDuration string `json:"totalTransferDuration,omitempty"` + // TransferBytes: Cumulative bytes trasferred so far for the replication + // relatinonship. + TransferBytes int64 `json:"transferBytes,omitempty,string"` + // UpdateTime: Time when progress was updated last. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "LagDuration") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LagDuration") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TransferStats) MarshalJSON() ([]byte, error) { + type NoMethod TransferStats + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// VerifyKmsConfigRequest: VerifyKmsConfigRequest specifies the KMS config to +// be validated. +type VerifyKmsConfigRequest struct { +} + +// VerifyKmsConfigResponse: VerifyKmsConfigResponse contains the information if +// the config is correctly and error message. +type VerifyKmsConfigResponse struct { + // HealthError: Output only. Error message if config is not healthy. + HealthError string `json:"healthError,omitempty"` + // Healthy: Output only. If the customer key configured correctly to the + // encrypt volume. + Healthy bool `json:"healthy,omitempty"` + // Instructions: Output only. Instructions for the customers to provide the + // access to the encryption key. + Instructions string `json:"instructions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "HealthError") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HealthError") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s VerifyKmsConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod VerifyKmsConfigResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Volume: Volume provides a filesystem that you can mount. +type Volume struct { + // ActiveDirectory: Output only. Specifies the ActiveDirectory name of a SMB + // volume. + ActiveDirectory string `json:"activeDirectory,omitempty"` + // BackupConfig: BackupConfig of the volume. + BackupConfig *BackupConfig `json:"backupConfig,omitempty"` + // CapacityGib: Required. Capacity in GIB of the volume + CapacityGib int64 `json:"capacityGib,omitempty,string"` + // ColdTierSizeGib: Output only. Size of the volume cold tier data in GiB. + ColdTierSizeGib int64 `json:"coldTierSizeGib,omitempty,string"` + // CreateTime: Output only. Create time of the volume + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. Description of the volume + Description string `json:"description,omitempty"` + // EncryptionType: Output only. Specified the current volume encryption key + // source. + // + // Possible values: + // "ENCRYPTION_TYPE_UNSPECIFIED" - The source of the encryption key is not + // specified. + // "SERVICE_MANAGED" - Google managed encryption key. + // "CLOUD_KMS" - Customer managed encryption key, which is stored in KMS. + EncryptionType string `json:"encryptionType,omitempty"` + // ExportPolicy: Optional. Export policy of the volume + ExportPolicy *ExportPolicy `json:"exportPolicy,omitempty"` + // HasReplication: Output only. Indicates whether the volume is part of a + // replication relationship. + HasReplication bool `json:"hasReplication,omitempty"` + // KerberosEnabled: Optional. Flag indicating if the volume is a kerberos + // volume or not, export policy rules control kerberos security modes (krb5, + // krb5i, krb5p). + KerberosEnabled bool `json:"kerberosEnabled,omitempty"` + // KmsConfig: Output only. Specifies the KMS config to be used for volume + // encryption. + KmsConfig string `json:"kmsConfig,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // LargeCapacity: Optional. Flag indicating if the volume will be a large + // capacity volume or a regular volume. + LargeCapacity bool `json:"largeCapacity,omitempty"` + // LdapEnabled: Output only. Flag indicating if the volume is NFS LDAP enabled + // or not. + LdapEnabled bool `json:"ldapEnabled,omitempty"` + // MountOptions: Output only. Mount options of this volume + MountOptions []*MountOption `json:"mountOptions,omitempty"` + // MultipleEndpoints: Optional. Flag indicating if the volume will have an IP + // address per node for volumes supporting multiple IP endpoints. Only the + // volume with large_capacity will be allowed to have multiple endpoints. + MultipleEndpoints bool `json:"multipleEndpoints,omitempty"` + // Name: Identifier. Name of the volume + Name string `json:"name,omitempty"` + // Network: Output only. VPC Network name. Format: + // projects/{project}/global/networks/{network} + Network string `json:"network,omitempty"` + // Protocols: Required. Protocols required for the volume + // + // Possible values: + // "PROTOCOLS_UNSPECIFIED" - Unspecified protocol + // "NFSV3" - NFS V3 protocol + // "NFSV4" - NFS V4 protocol + // "SMB" - SMB protocol + Protocols []string `json:"protocols,omitempty"` + // PsaRange: Output only. This field is not implemented. The values provided in + // this field are ignored. + PsaRange string `json:"psaRange,omitempty"` + // ReplicaZone: Output only. Specifies the replica zone for regional volume. + ReplicaZone string `json:"replicaZone,omitempty"` + // RestoreParameters: Optional. Specifies the source of the volume to be + // created from. + RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"` + // RestrictedActions: Optional. List of actions that are restricted on this + // volume. + // + // Possible values: + // "RESTRICTED_ACTION_UNSPECIFIED" - Unspecified restricted action + // "DELETE" - Prevent volume from being deleted when mounted. + RestrictedActions []string `json:"restrictedActions,omitempty"` + // SecurityStyle: Optional. Security Style of the Volume + // + // Possible values: + // "SECURITY_STYLE_UNSPECIFIED" - SecurityStyle is unspecified + // "NTFS" - SecurityStyle uses NTFS + // "UNIX" - SecurityStyle uses UNIX + SecurityStyle string `json:"securityStyle,omitempty"` + // ServiceLevel: Output only. Service level of the volume + // + // Possible values: + // "SERVICE_LEVEL_UNSPECIFIED" - Unspecified service level. + // "PREMIUM" - Premium service level. + // "EXTREME" - Extreme service level. + // "STANDARD" - Standard service level. + // "FLEX" - Flex service level. + ServiceLevel string `json:"serviceLevel,omitempty"` + // ShareName: Required. Share name of the volume + ShareName string `json:"shareName,omitempty"` + // SmbSettings: Optional. SMB share settings for the volume. + // + // Possible values: + // "SMB_SETTINGS_UNSPECIFIED" - Unspecified default option + // "ENCRYPT_DATA" - SMB setting encrypt data + // "BROWSABLE" - SMB setting browsable + // "CHANGE_NOTIFY" - SMB setting notify change + // "NON_BROWSABLE" - SMB setting not to notify change + // "OPLOCKS" - SMB setting oplocks + // "SHOW_SNAPSHOT" - SMB setting to show snapshots + // "SHOW_PREVIOUS_VERSIONS" - SMB setting to show previous versions + // "ACCESS_BASED_ENUMERATION" - SMB setting to access volume based on + // enumerartion + // "CONTINUOUSLY_AVAILABLE" - Continuously available enumeration + SmbSettings []string `json:"smbSettings,omitempty"` + // SnapReserve: Optional. Snap_reserve specifies percentage of volume storage + // reserved for snapshot storage. Default is 0 percent. + SnapReserve float64 `json:"snapReserve,omitempty"` + // SnapshotDirectory: Optional. Snapshot_directory if enabled (true) the volume + // will contain a read-only .snapshot directory which provides access to each + // of the volume's snapshots. + SnapshotDirectory bool `json:"snapshotDirectory,omitempty"` + // SnapshotPolicy: Optional. SnapshotPolicy for a volume. + SnapshotPolicy *SnapshotPolicy `json:"snapshotPolicy,omitempty"` + // State: Output only. State of the volume + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified Volume State + // "READY" - Volume State is Ready + // "CREATING" - Volume State is Creating + // "DELETING" - Volume State is Deleting + // "UPDATING" - Volume State is Updating + // "RESTORING" - Volume State is Restoring + // "DISABLED" - Volume State is Disabled + // "ERROR" - Volume State is Error + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the volume + StateDetails string `json:"stateDetails,omitempty"` + // StoragePool: Required. StoragePool name of the volume + StoragePool string `json:"storagePool,omitempty"` + // TieringPolicy: Tiering policy for the volume. + TieringPolicy *TieringPolicy `json:"tieringPolicy,omitempty"` + // UnixPermissions: Optional. Default unix style permission (e.g. 777) the + // mount point will be created with. Applicable for NFS protocol types only. + UnixPermissions string `json:"unixPermissions,omitempty"` + // UsedGib: Output only. Used capacity in GIB of the volume. This is computed + // periodically and it does not represent the realtime usage. + UsedGib int64 `json:"usedGib,omitempty,string"` + // Zone: Output only. Specifies the active zone for regional volume. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ActiveDirectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveDirectory") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Volume) MarshalJSON() ([]byte, error) { + type NoMethod Volume + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *Volume) UnmarshalJSON(data []byte) error { + type NoMethod Volume + var s1 struct { + SnapReserve gensupport.JSONFloat64 `json:"snapReserve"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SnapReserve = float64(s1.SnapReserve) + return nil +} + +// WeeklySchedule: Make a snapshot every week e.g. at Monday 04:00, Wednesday +// 05:20, Sunday 23:50 +type WeeklySchedule struct { + // Day: Set the day or days of the week to make a snapshot. Accepts a comma + // separated days of the week. Defaults to 'Sunday'. + Day string `json:"day,omitempty"` + // Hour: Set the hour to start the snapshot (0-23), defaults to midnight (0). + Hour float64 `json:"hour,omitempty"` + // Minute: Set the minute of the hour to start the snapshot (0-59), defaults to + // the top of the hour (0). + Minute float64 `json:"minute,omitempty"` + // SnapshotsToKeep: The maximum number of Snapshots to keep for the hourly + // schedule + SnapshotsToKeep float64 `json:"snapshotsToKeep,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Day") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s WeeklySchedule) MarshalJSON() ([]byte, error) { + type NoMethod WeeklySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *WeeklySchedule) UnmarshalJSON(data []byte) error { + type NoMethod WeeklySchedule + var s1 struct { + Hour gensupport.JSONFloat64 `json:"hour"` + Minute gensupport.JSONFloat64 `json:"minute"` + SnapshotsToKeep gensupport.JSONFloat64 `json:"snapshotsToKeep"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Hour = float64(s1.Hour) + s.Minute = float64(s1.Minute) + s.SnapshotsToKeep = float64(s1.SnapshotsToKeep) + return nil +} + +type ZoneConfiguration struct { + Zone string `json:"zone,omitempty"` + // ForceSendFields is a list of field names (e.g. "Zone") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Zone") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ZoneConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod ZoneConfiguration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +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 +// details. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.get" call. +// 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 +} + +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 +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.list" call. +// 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 +} + +// 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")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsActiveDirectoriesCreateCall struct { + s *Service + parent string + activedirectory *ActiveDirectory + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: CreateActiveDirectory Creates the active directory specified in the +// request. +// +// - parent: Value for parent. +func (r *ProjectsLocationsActiveDirectoriesService) Create(parent string, activedirectory *ActiveDirectory) *ProjectsLocationsActiveDirectoriesCreateCall { + c := &ProjectsLocationsActiveDirectoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.activedirectory = activedirectory + return c +} + +// ActiveDirectoryId sets the optional parameter "activeDirectoryId": Required. +// ID of the active directory to create. Must be unique within the parent +// resource. Must contain only letters, numbers and hyphen, with the first +// character a letter , the last a letter or a number, and a 63 character +// maximum. +func (c *ProjectsLocationsActiveDirectoriesCreateCall) ActiveDirectoryId(activeDirectoryId string) *ProjectsLocationsActiveDirectoriesCreateCall { + c.urlParams_.Set("activeDirectoryId", activeDirectoryId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsActiveDirectoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.activedirectory) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/activeDirectories") + 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 "netapp.projects.locations.activeDirectories.create" call. +// 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 *ProjectsLocationsActiveDirectoriesCreateCall) 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 +} + +type ProjectsLocationsActiveDirectoriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete the active directory specified in the request. +// +// - name: Name of the active directory. +func (r *ProjectsLocationsActiveDirectoriesService) Delete(name string) *ProjectsLocationsActiveDirectoriesDeleteCall { + c := &ProjectsLocationsActiveDirectoriesDeleteCall{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 +// details. +func (c *ProjectsLocationsActiveDirectoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.activeDirectories.delete" call. +// 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 *ProjectsLocationsActiveDirectoriesDeleteCall) 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 +} + +type ProjectsLocationsActiveDirectoriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes a specified active directory. +// +// - name: Name of the active directory. +func (r *ProjectsLocationsActiveDirectoriesService) Get(name string) *ProjectsLocationsActiveDirectoriesGetCall { + c := &ProjectsLocationsActiveDirectoriesGetCall{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 +// details. +func (c *ProjectsLocationsActiveDirectoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsActiveDirectoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsActiveDirectoriesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesGetCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.activeDirectories.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *ActiveDirectory.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 *ProjectsLocationsActiveDirectoriesGetCall) Do(opts ...googleapi.CallOption) (*ActiveDirectory, 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 := &ActiveDirectory{ + 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 +} + +type ProjectsLocationsActiveDirectoriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists active directories. +// +// - parent: Parent value for ListActiveDirectoriesRequest. +func (r *ProjectsLocationsActiveDirectoriesService) List(parent string) *ProjectsLocationsActiveDirectoriesListCall { + c := &ProjectsLocationsActiveDirectoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsActiveDirectoriesListCall) Filter(filter string) *ProjectsLocationsActiveDirectoriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsActiveDirectoriesListCall) OrderBy(orderBy string) *ProjectsLocationsActiveDirectoriesListCall { + 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, the server will pick +// an appropriate default. +func (c *ProjectsLocationsActiveDirectoriesListCall) PageSize(pageSize int64) *ProjectsLocationsActiveDirectoriesListCall { + 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 *ProjectsLocationsActiveDirectoriesListCall) PageToken(pageToken string) *ProjectsLocationsActiveDirectoriesListCall { + 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 +// details. +func (c *ProjectsLocationsActiveDirectoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsActiveDirectoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsActiveDirectoriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesListCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/activeDirectories") + 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 "netapp.projects.locations.activeDirectories.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListActiveDirectoriesResponse.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 *ProjectsLocationsActiveDirectoriesListCall) Do(opts ...googleapi.CallOption) (*ListActiveDirectoriesResponse, 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 := &ListActiveDirectoriesResponse{ + 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 +} + +// 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 *ProjectsLocationsActiveDirectoriesListCall) Pages(ctx context.Context, f func(*ListActiveDirectoriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsActiveDirectoriesPatchCall struct { + s *Service + name string + activedirectory *ActiveDirectory + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update the parameters of an active directories. +// +// - name: Identifier. The resource name of the active directory. Format: +// `projects/{project_number}/locations/{location_id}/activeDirectories/{activ +// e_directory_id}`. +func (r *ProjectsLocationsActiveDirectoriesService) Patch(name string, activedirectory *ActiveDirectory) *ProjectsLocationsActiveDirectoriesPatchCall { + c := &ProjectsLocationsActiveDirectoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.activedirectory = activedirectory + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Active Directory +// 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 *ProjectsLocationsActiveDirectoriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsActiveDirectoriesPatchCall { + 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 +// details. +func (c *ProjectsLocationsActiveDirectoriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsActiveDirectoriesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsActiveDirectoriesPatchCall) Context(ctx context.Context) *ProjectsLocationsActiveDirectoriesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsActiveDirectoriesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsActiveDirectoriesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.activedirectory) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.activeDirectories.patch" call. +// 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 *ProjectsLocationsActiveDirectoriesPatchCall) 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 +} + +type ProjectsLocationsBackupPoliciesCreateCall struct { + s *Service + parent string + backuppolicy *BackupPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates new backup policy +// +// - parent: The location to create the backup policies of, in the format +// `projects/{project_id}/locations/{location}`. +func (r *ProjectsLocationsBackupPoliciesService) Create(parent string, backuppolicy *BackupPolicy) *ProjectsLocationsBackupPoliciesCreateCall { + c := &ProjectsLocationsBackupPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backuppolicy = backuppolicy + return c +} + +// BackupPolicyId sets the optional parameter "backupPolicyId": Required. The +// ID to use for the backup policy. The ID must be unique within the specified +// location. Must contain only letters, numbers and hyphen, with the first +// character a letter, the last a letter or a number, and a 63 character +// maximum. +func (c *ProjectsLocationsBackupPoliciesCreateCall) BackupPolicyId(backupPolicyId string) *ProjectsLocationsBackupPoliciesCreateCall { + c.urlParams_.Set("backupPolicyId", backupPolicyId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuppolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/backupPolicies") + 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 "netapp.projects.locations.backupPolicies.create" call. +// 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 *ProjectsLocationsBackupPoliciesCreateCall) 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 +} + +type ProjectsLocationsBackupPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the backup policy. +// +// - name: The backup policy resource name, in the format +// `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_i +// d}`. +func (r *ProjectsLocationsBackupPoliciesService) Delete(name string) *ProjectsLocationsBackupPoliciesDeleteCall { + c := &ProjectsLocationsBackupPoliciesDeleteCall{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 +// details. +func (c *ProjectsLocationsBackupPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.backupPolicies.delete" call. +// 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 *ProjectsLocationsBackupPoliciesDeleteCall) 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 +} + +type ProjectsLocationsBackupPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified backup policy by +// backup_policy_id. +// +// - name: The backupPolicy resource name, in the format +// `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_i +// d}`. +func (r *ProjectsLocationsBackupPoliciesService) Get(name string) *ProjectsLocationsBackupPoliciesGetCall { + c := &ProjectsLocationsBackupPoliciesGetCall{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 +// details. +func (c *ProjectsLocationsBackupPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.backupPolicies.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackupPolicy.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 *ProjectsLocationsBackupPoliciesGetCall) Do(opts ...googleapi.CallOption) (*BackupPolicy, 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 := &BackupPolicy{ + 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 +} + +type ProjectsLocationsBackupPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns list of all available backup policies. +// +// - parent: Parent value for ListBackupPoliciesRequest. +func (r *ProjectsLocationsBackupPoliciesService) List(parent string) *ProjectsLocationsBackupPoliciesListCall { + c := &ProjectsLocationsBackupPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsBackupPoliciesListCall) Filter(filter string) *ProjectsLocationsBackupPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsBackupPoliciesListCall) OrderBy(orderBy string) *ProjectsLocationsBackupPoliciesListCall { + 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, the server will pick +// an appropriate default. +func (c *ProjectsLocationsBackupPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsBackupPoliciesListCall { + 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 *ProjectsLocationsBackupPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsBackupPoliciesListCall { + 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 +// details. +func (c *ProjectsLocationsBackupPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/backupPolicies") + 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 "netapp.projects.locations.backupPolicies.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupPoliciesResponse.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 *ProjectsLocationsBackupPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListBackupPoliciesResponse, 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 := &ListBackupPoliciesResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupPoliciesListCall) Pages(ctx context.Context, f func(*ListBackupPoliciesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsBackupPoliciesPatchCall struct { + s *Service + name string + backuppolicy *BackupPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates settings of a specific backup policy. +// +// - name: Identifier. The resource name of the backup policy. Format: +// `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_i +// d}`. +func (r *ProjectsLocationsBackupPoliciesService) Patch(name string, backuppolicy *BackupPolicy) *ProjectsLocationsBackupPoliciesPatchCall { + c := &ProjectsLocationsBackupPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backuppolicy = backuppolicy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Backup Policy 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 *ProjectsLocationsBackupPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupPoliciesPatchCall { + 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 +// details. +func (c *ProjectsLocationsBackupPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPoliciesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupPoliciesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuppolicy) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.backupPolicies.patch" call. +// 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 *ProjectsLocationsBackupPoliciesPatchCall) 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 +} + +type ProjectsLocationsBackupVaultsCreateCall struct { + s *Service + parent string + backupvault *BackupVault + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates new backup vault +// +// - parent: The location to create the backup vaults, in the format +// `projects/{project_id}/locations/{location}`. +func (r *ProjectsLocationsBackupVaultsService) Create(parent string, backupvault *BackupVault) *ProjectsLocationsBackupVaultsCreateCall { + c := &ProjectsLocationsBackupVaultsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backupvault = backupvault + return c +} + +// BackupVaultId sets the optional parameter "backupVaultId": Required. The ID +// to use for the backupVault. The ID must be unique within the specified +// location. Must contain only letters, numbers and hyphen, with the first +// character a letter, the last a letter or a number, and a 63 character +// maximum. +func (c *ProjectsLocationsBackupVaultsCreateCall) BackupVaultId(backupVaultId string) *ProjectsLocationsBackupVaultsCreateCall { + c.urlParams_.Set("backupVaultId", backupVaultId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupVaultsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backupvault) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/backupVaults") + 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 "netapp.projects.locations.backupVaults.create" call. +// 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 *ProjectsLocationsBackupVaultsCreateCall) 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 +} + +type ProjectsLocationsBackupVaultsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the backup vault. +// +// - name: The backupVault resource name, in the format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. +func (r *ProjectsLocationsBackupVaultsService) Delete(name string) *ProjectsLocationsBackupVaultsDeleteCall { + c := &ProjectsLocationsBackupVaultsDeleteCall{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 +// details. +func (c *ProjectsLocationsBackupVaultsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.backupVaults.delete" call. +// 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 *ProjectsLocationsBackupVaultsDeleteCall) 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 +} + +type ProjectsLocationsBackupVaultsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified backup vault +// +// - name: The backupVault resource name, in the format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. +func (r *ProjectsLocationsBackupVaultsService) Get(name string) *ProjectsLocationsBackupVaultsGetCall { + c := &ProjectsLocationsBackupVaultsGetCall{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 +// details. +func (c *ProjectsLocationsBackupVaultsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupVaultsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupVaultsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.backupVaults.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackupVault.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 *ProjectsLocationsBackupVaultsGetCall) Do(opts ...googleapi.CallOption) (*BackupVault, 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 := &BackupVault{ + 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 +} + +type ProjectsLocationsBackupVaultsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns list of all available backup vaults. +// +// - parent: The location for which to retrieve backupVault information, in the +// format `projects/{project_id}/locations/{location}`. +func (r *ProjectsLocationsBackupVaultsService) List(parent string) *ProjectsLocationsBackupVaultsListCall { + c := &ProjectsLocationsBackupVaultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsBackupVaultsListCall) Filter(filter string) *ProjectsLocationsBackupVaultsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsBackupVaultsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupVaultsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsBackupVaultsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupVaultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsBackupVaultsListCall) PageToken(pageToken string) *ProjectsLocationsBackupVaultsListCall { + 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 +// details. +func (c *ProjectsLocationsBackupVaultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupVaultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupVaultsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsListCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/backupVaults") + 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 "netapp.projects.locations.backupVaults.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupVaultsResponse.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 *ProjectsLocationsBackupVaultsListCall) Do(opts ...googleapi.CallOption) (*ListBackupVaultsResponse, 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 := &ListBackupVaultsResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupVaultsListCall) Pages(ctx context.Context, f func(*ListBackupVaultsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsBackupVaultsPatchCall struct { + s *Service + name string + backupvault *BackupVault + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the settings of a specific backup vault. +// +// - name: Identifier. The resource name of the backup vault. Format: +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` +// . +func (r *ProjectsLocationsBackupVaultsService) Patch(name string, backupvault *BackupVault) *ProjectsLocationsBackupVaultsPatchCall { + c := &ProjectsLocationsBackupVaultsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backupvault = backupvault + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Backup resource to be +// updated. 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 *ProjectsLocationsBackupVaultsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupVaultsPatchCall { + 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 +// details. +func (c *ProjectsLocationsBackupVaultsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backupvault) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.backupVaults.patch" call. +// 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 *ProjectsLocationsBackupVaultsPatchCall) 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 +} + +type ProjectsLocationsBackupVaultsBackupsCreateCall struct { + s *Service + parent string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a backup from the volume specified in the request The backup +// can be created from the given snapshot if specified in the request. If no +// snapshot specified, there'll be a new snapshot taken to initiate the backup +// creation. +// +// - parent: The NetApp backupVault to create the backups of, in the format +// `projects/*/locations/*/backupVaults/{backup_vault_id}`. +func (r *ProjectsLocationsBackupVaultsBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsBackupVaultsBackupsCreateCall { + c := &ProjectsLocationsBackupVaultsBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backup = backup + return c +} + +// BackupId sets the optional parameter "backupId": Required. The ID to use for +// the backup. The ID must be unique within the specified backupVault. Must +// contain only letters, numbers and hyphen, with the first character a letter, +// the last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsBackupVaultsBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/backups") + 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 "netapp.projects.locations.backupVaults.backups.create" call. +// 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 *ProjectsLocationsBackupVaultsBackupsCreateCall) 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 +} + +type ProjectsLocationsBackupVaultsBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the backup. +// +// - name: The backup resource name, in the format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/ +// backups/{backup_id}`. +func (r *ProjectsLocationsBackupVaultsBackupsService) Delete(name string) *ProjectsLocationsBackupVaultsBackupsDeleteCall { + c := &ProjectsLocationsBackupVaultsBackupsDeleteCall{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 +// details. +func (c *ProjectsLocationsBackupVaultsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.backupVaults.backups.delete" call. +// 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 *ProjectsLocationsBackupVaultsBackupsDeleteCall) 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 +} + +type ProjectsLocationsBackupVaultsBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified backup +// +// - name: The backup resource name, in the format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/ +// backups/{backup_id}`. +func (r *ProjectsLocationsBackupVaultsBackupsService) Get(name string) *ProjectsLocationsBackupVaultsBackupsGetCall { + c := &ProjectsLocationsBackupVaultsBackupsGetCall{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 +// details. +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupVaultsBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.backupVaults.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Backup.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 *ProjectsLocationsBackupVaultsBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, 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 := &Backup{ + 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 +} + +type ProjectsLocationsBackupVaultsBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all backups for a backupVault. +// +// - parent: The backupVault for which to retrieve backup information, in the +// format +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` +// . To retrieve backup information for all locations, use "-" for the +// `{location}` value. To retrieve backup information for all backupVaults, +// use "-" for the `{backup_vault_id}` value. To retrieve backup information +// for a volume, use "-" for the `{backup_vault_id}` value and specify volume +// full name with the filter. +func (r *ProjectsLocationsBackupVaultsBackupsService) List(parent string) *ProjectsLocationsBackupVaultsBackupsListCall { + c := &ProjectsLocationsBackupVaultsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. If +// specified, backups will be returned based on the attribute name that matches +// the filter expression. If empty, then no backups are filtered out. See +// https://google.aip.dev/160 +func (c *ProjectsLocationsBackupVaultsBackupsListCall) Filter(filter string) *ProjectsLocationsBackupVaultsBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsBackupVaultsBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupVaultsBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. The service may return fewer than this value. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupVaultsBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupVaultsBackupsListCall { + 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 +// details. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupVaultsBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/backups") + 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 "netapp.projects.locations.backupVaults.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupsResponse.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 *ProjectsLocationsBackupVaultsBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, 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 := &ListBackupsResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupVaultsBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsBackupVaultsBackupsPatchCall struct { + s *Service + name string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update backup with full spec. +// +// - name: Identifier. The resource name of the backup. Format: +// `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/ +// backups/{backup_id}`. +func (r *ProjectsLocationsBackupVaultsBackupsService) Patch(name string, backup *Backup) *ProjectsLocationsBackupVaultsBackupsPatchCall { + c := &ProjectsLocationsBackupVaultsBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backup = backup + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Backup resource to be +// updated. 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 *ProjectsLocationsBackupVaultsBackupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupVaultsBackupsPatchCall { + 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 +// details. +func (c *ProjectsLocationsBackupVaultsBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupVaultsBackupsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupVaultsBackupsPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupVaultsBackupsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupVaultsBackupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupVaultsBackupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.backupVaults.backups.patch" call. +// 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 *ProjectsLocationsBackupVaultsBackupsPatchCall) 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 +} + +type ProjectsLocationsKmsConfigsCreateCall struct { + s *Service + parent string + kmsconfig *KmsConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new KMS config. +// +// - parent: Value for parent. +func (r *ProjectsLocationsKmsConfigsService) Create(parent string, kmsconfig *KmsConfig) *ProjectsLocationsKmsConfigsCreateCall { + c := &ProjectsLocationsKmsConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.kmsconfig = kmsconfig + return c +} + +// KmsConfigId sets the optional parameter "kmsConfigId": Required. Id of the +// requesting KmsConfig. Must be unique within the parent resource. Must +// contain only letters, numbers and hyphen, with the first character a letter, +// the last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsKmsConfigsCreateCall) KmsConfigId(kmsConfigId string) *ProjectsLocationsKmsConfigsCreateCall { + c.urlParams_.Set("kmsConfigId", kmsConfigId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsKmsConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.kmsconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/kmsConfigs") + 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 "netapp.projects.locations.kmsConfigs.create" call. +// 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 *ProjectsLocationsKmsConfigsCreateCall) 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 +} + +type ProjectsLocationsKmsConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the Kms config. +// +// - name: Name of the KmsConfig. +func (r *ProjectsLocationsKmsConfigsService) Delete(name string) *ProjectsLocationsKmsConfigsDeleteCall { + c := &ProjectsLocationsKmsConfigsDeleteCall{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 +// details. +func (c *ProjectsLocationsKmsConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.kmsConfigs.delete" call. +// 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 *ProjectsLocationsKmsConfigsDeleteCall) 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 +} + +type ProjectsLocationsKmsConfigsEncryptCall struct { + s *Service + name string + encryptvolumesrequest *EncryptVolumesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Encrypt: Encrypt the existing volumes without CMEK encryption with the +// desired the KMS config for the whole region. +// +// - name: Name of the KmsConfig. +func (r *ProjectsLocationsKmsConfigsService) Encrypt(name string, encryptvolumesrequest *EncryptVolumesRequest) *ProjectsLocationsKmsConfigsEncryptCall { + c := &ProjectsLocationsKmsConfigsEncryptCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.encryptvolumesrequest = encryptvolumesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsKmsConfigsEncryptCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsEncryptCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsEncryptCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsEncryptCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsEncryptCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsEncryptCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.encryptvolumesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:encrypt") + 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 "netapp.projects.locations.kmsConfigs.encrypt" call. +// 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 *ProjectsLocationsKmsConfigsEncryptCall) 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 +} + +type ProjectsLocationsKmsConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified KMS config by kms_config_id. +// +// - name: Name of the KmsConfig. +func (r *ProjectsLocationsKmsConfigsService) Get(name string) *ProjectsLocationsKmsConfigsGetCall { + c := &ProjectsLocationsKmsConfigsGetCall{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 +// details. +func (c *ProjectsLocationsKmsConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsKmsConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsKmsConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.kmsConfigs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *KmsConfig.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 *ProjectsLocationsKmsConfigsGetCall) Do(opts ...googleapi.CallOption) (*KmsConfig, 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 := &KmsConfig{ + 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 +} + +type ProjectsLocationsKmsConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all KMS configs owned by the caller. +// +// - parent: Parent value. +func (r *ProjectsLocationsKmsConfigsService) List(parent string) *ProjectsLocationsKmsConfigsListCall { + c := &ProjectsLocationsKmsConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsKmsConfigsListCall) Filter(filter string) *ProjectsLocationsKmsConfigsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsKmsConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsKmsConfigsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsKmsConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsKmsConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsKmsConfigsListCall) PageToken(pageToken string) *ProjectsLocationsKmsConfigsListCall { + 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 +// details. +func (c *ProjectsLocationsKmsConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsKmsConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsKmsConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsListCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/kmsConfigs") + 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 "netapp.projects.locations.kmsConfigs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListKmsConfigsResponse.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 *ProjectsLocationsKmsConfigsListCall) Do(opts ...googleapi.CallOption) (*ListKmsConfigsResponse, 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 := &ListKmsConfigsResponse{ + 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 +} + +// 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 *ProjectsLocationsKmsConfigsListCall) Pages(ctx context.Context, f func(*ListKmsConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsKmsConfigsPatchCall struct { + s *Service + name string + kmsconfig *KmsConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the Kms config properties with the full spec +// +// - name: Identifier. Name of the KmsConfig. +func (r *ProjectsLocationsKmsConfigsService) Patch(name string, kmsconfig *KmsConfig) *ProjectsLocationsKmsConfigsPatchCall { + c := &ProjectsLocationsKmsConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.kmsconfig = kmsconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the KmsConfig 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 *ProjectsLocationsKmsConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsKmsConfigsPatchCall { + 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 +// details. +func (c *ProjectsLocationsKmsConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.kmsconfig) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.kmsConfigs.patch" call. +// 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 *ProjectsLocationsKmsConfigsPatchCall) 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 +} + +type ProjectsLocationsKmsConfigsVerifyCall struct { + s *Service + name string + verifykmsconfigrequest *VerifyKmsConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Verify: Verifies KMS config reachability. +// +// - name: Name of the KMS Config to be verified. +func (r *ProjectsLocationsKmsConfigsService) Verify(name string, verifykmsconfigrequest *VerifyKmsConfigRequest) *ProjectsLocationsKmsConfigsVerifyCall { + c := &ProjectsLocationsKmsConfigsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.verifykmsconfigrequest = verifykmsconfigrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsKmsConfigsVerifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsKmsConfigsVerifyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsKmsConfigsVerifyCall) Context(ctx context.Context) *ProjectsLocationsKmsConfigsVerifyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsKmsConfigsVerifyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsKmsConfigsVerifyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.verifykmsconfigrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:verify") + 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 "netapp.projects.locations.kmsConfigs.verify" call. +// Any non-2xx status code is an error. Response headers are in either +// *VerifyKmsConfigResponse.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 *ProjectsLocationsKmsConfigsVerifyCall) Do(opts ...googleapi.CallOption) (*VerifyKmsConfigResponse, 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 := &VerifyKmsConfigResponse{ + 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 +} + +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 +// details. +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. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "netapp.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 +} + +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 +// details. +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. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.operations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 +} + +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 +// details. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.operations.get" call. +// 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 +} + +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 +// details. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.operations.list" call. +// 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 +} + +// 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")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsStoragePoolsCreateCall struct { + s *Service + parent string + storagepool *StoragePool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new storage pool. +// +// - parent: Value for parent. +func (r *ProjectsLocationsStoragePoolsService) Create(parent string, storagepool *StoragePool) *ProjectsLocationsStoragePoolsCreateCall { + c := &ProjectsLocationsStoragePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.storagepool = storagepool + return c +} + +// StoragePoolId sets the optional parameter "storagePoolId": Required. Id of +// the requesting storage pool. Must be unique within the parent resource. Must +// contain only letters, numbers and hyphen, with the first character a letter, +// the last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsStoragePoolsCreateCall) StoragePoolId(storagePoolId string) *ProjectsLocationsStoragePoolsCreateCall { + c.urlParams_.Set("storagePoolId", storagePoolId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsStoragePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.storagepool) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/storagePools") + 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 "netapp.projects.locations.storagePools.create" call. +// 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 *ProjectsLocationsStoragePoolsCreateCall) 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 +} + +type ProjectsLocationsStoragePoolsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Warning! This operation will permanently delete the storage pool. +// +// - name: Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) Delete(name string) *ProjectsLocationsStoragePoolsDeleteCall { + c := &ProjectsLocationsStoragePoolsDeleteCall{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 +// details. +func (c *ProjectsLocationsStoragePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.storagePools.delete" call. +// 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 *ProjectsLocationsStoragePoolsDeleteCall) 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 +} + +type ProjectsLocationsStoragePoolsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the description of the specified storage pool by poolId. +// +// - name: Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) Get(name string) *ProjectsLocationsStoragePoolsGetCall { + c := &ProjectsLocationsStoragePoolsGetCall{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 +// details. +func (c *ProjectsLocationsStoragePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsStoragePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoragePoolsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.storagePools.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *StoragePool.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 *ProjectsLocationsStoragePoolsGetCall) Do(opts ...googleapi.CallOption) (*StoragePool, 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 := &StoragePool{ + 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 +} + +type ProjectsLocationsStoragePoolsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all storage pools owned by the caller. +// +// - parent: Parent value. +func (r *ProjectsLocationsStoragePoolsService) List(parent string) *ProjectsLocationsStoragePoolsListCall { + c := &ProjectsLocationsStoragePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsStoragePoolsListCall) Filter(filter string) *ProjectsLocationsStoragePoolsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsStoragePoolsListCall) OrderBy(orderBy string) *ProjectsLocationsStoragePoolsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsStoragePoolsListCall) PageSize(pageSize int64) *ProjectsLocationsStoragePoolsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsStoragePoolsListCall) PageToken(pageToken string) *ProjectsLocationsStoragePoolsListCall { + 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 +// details. +func (c *ProjectsLocationsStoragePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsStoragePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoragePoolsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsListCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/storagePools") + 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 "netapp.projects.locations.storagePools.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListStoragePoolsResponse.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 *ProjectsLocationsStoragePoolsListCall) Do(opts ...googleapi.CallOption) (*ListStoragePoolsResponse, 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 := &ListStoragePoolsResponse{ + 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 +} + +// 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 *ProjectsLocationsStoragePoolsListCall) Pages(ctx context.Context, f func(*ListStoragePoolsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsStoragePoolsPatchCall struct { + s *Service + name string + storagepool *StoragePool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the storage pool properties with the full spec +// +// - name: Identifier. Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) Patch(name string, storagepool *StoragePool) *ProjectsLocationsStoragePoolsPatchCall { + c := &ProjectsLocationsStoragePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.storagepool = storagepool + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the StoragePool 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 *ProjectsLocationsStoragePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsStoragePoolsPatchCall { + 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 +// details. +func (c *ProjectsLocationsStoragePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.storagepool) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.storagePools.patch" call. +// 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 *ProjectsLocationsStoragePoolsPatchCall) 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 +} + +type ProjectsLocationsStoragePoolsSwitchCall struct { + s *Service + name string + switchactivereplicazonerequest *SwitchActiveReplicaZoneRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Switch: This operation will switch the active/replica zone for a regional +// storagePool. +// +// - name: Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) Switch(name string, switchactivereplicazonerequest *SwitchActiveReplicaZoneRequest) *ProjectsLocationsStoragePoolsSwitchCall { + c := &ProjectsLocationsStoragePoolsSwitchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.switchactivereplicazonerequest = switchactivereplicazonerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsStoragePoolsSwitchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsSwitchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsSwitchCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsSwitchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsSwitchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsSwitchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.switchactivereplicazonerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:switch") + 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 "netapp.projects.locations.storagePools.switch" call. +// 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 *ProjectsLocationsStoragePoolsSwitchCall) 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 +} + +type ProjectsLocationsVolumesCreateCall struct { + s *Service + parent string + volume *Volume + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Volume in a given project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsVolumesService) Create(parent string, volume *Volume) *ProjectsLocationsVolumesCreateCall { + c := &ProjectsLocationsVolumesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.volume = volume + return c +} + +// VolumeId sets the optional parameter "volumeId": Required. Id of the +// requesting volume. Must be unique within the parent resource. Must contain +// only letters, numbers and hyphen, with the first character a letter, the +// last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsVolumesCreateCall) VolumeId(volumeId string) *ProjectsLocationsVolumesCreateCall { + c.urlParams_.Set("volumeId", volumeId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.volume) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/volumes") + 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 "netapp.projects.locations.volumes.create" call. +// 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 *ProjectsLocationsVolumesCreateCall) 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 +} + +type ProjectsLocationsVolumesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Volume. +// +// - name: Name of the volume. +func (r *ProjectsLocationsVolumesService) Delete(name string) *ProjectsLocationsVolumesDeleteCall { + c := &ProjectsLocationsVolumesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If this field is set as true, +// CCFE will not block the volume resource deletion even if it has any +// snapshots resource. (Otherwise, the request will only work if the volume has +// no snapshots.) +func (c *ProjectsLocationsVolumesDeleteCall) Force(force bool) *ProjectsLocationsVolumesDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.volumes.delete" call. +// 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 *ProjectsLocationsVolumesDeleteCall) 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 +} + +type ProjectsLocationsVolumesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Volume. +// +// - name: Name of the volume. +func (r *ProjectsLocationsVolumesService) Get(name string) *ProjectsLocationsVolumesGetCall { + c := &ProjectsLocationsVolumesGetCall{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 +// details. +func (c *ProjectsLocationsVolumesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.volumes.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Volume.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 *ProjectsLocationsVolumesGetCall) Do(opts ...googleapi.CallOption) (*Volume, 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 := &Volume{ + 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 +} + +type ProjectsLocationsVolumesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Volumes in a given project. +// +// - parent: Parent value for ListVolumesRequest. +func (r *ProjectsLocationsVolumesService) List(parent string) *ProjectsLocationsVolumesListCall { + c := &ProjectsLocationsVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsVolumesListCall) Filter(filter string) *ProjectsLocationsVolumesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsVolumesListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesListCall { + 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, the server will pick +// an appropriate default. +func (c *ProjectsLocationsVolumesListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesListCall { + 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 *ProjectsLocationsVolumesListCall) PageToken(pageToken string) *ProjectsLocationsVolumesListCall { + 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 +// details. +func (c *ProjectsLocationsVolumesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesListCall) Context(ctx context.Context) *ProjectsLocationsVolumesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/volumes") + 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 "netapp.projects.locations.volumes.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListVolumesResponse.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 *ProjectsLocationsVolumesListCall) Do(opts ...googleapi.CallOption) (*ListVolumesResponse, 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 := &ListVolumesResponse{ + 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 +} + +// 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 *ProjectsLocationsVolumesListCall) Pages(ctx context.Context, f func(*ListVolumesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsVolumesPatchCall struct { + s *Service + name string + volume *Volume + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Volume. +// +// - name: Identifier. Name of the volume. +func (r *ProjectsLocationsVolumesService) Patch(name string, volume *Volume) *ProjectsLocationsVolumesPatchCall { + c := &ProjectsLocationsVolumesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.volume = volume + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Volume 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 *ProjectsLocationsVolumesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesPatchCall { + 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 +// details. +func (c *ProjectsLocationsVolumesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.volume) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.volumes.patch" call. +// 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 *ProjectsLocationsVolumesPatchCall) 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 +} + +type ProjectsLocationsVolumesRevertCall struct { + s *Service + name string + revertvolumerequest *RevertVolumeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Revert: Revert an existing volume to a specified snapshot. Warning! This +// operation will permanently revert all changes made after the snapshot was +// created. +// +// - name: The resource name of the volume, in the format of +// projects/{project_id}/locations/{location}/volumes/{volume_id}. +func (r *ProjectsLocationsVolumesService) Revert(name string, revertvolumerequest *RevertVolumeRequest) *ProjectsLocationsVolumesRevertCall { + c := &ProjectsLocationsVolumesRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.revertvolumerequest = revertvolumerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesRevertCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesRevertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesRevertCall) Context(ctx context.Context) *ProjectsLocationsVolumesRevertCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesRevertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesRevertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.revertvolumerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:revert") + 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 "netapp.projects.locations.volumes.revert" call. +// 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 *ProjectsLocationsVolumesRevertCall) 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 +} + +type ProjectsLocationsVolumesReplicationsCreateCall struct { + s *Service + parent string + replication *Replication + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a new replication for a volume. +// +// - parent: The NetApp volume to create the replications of, in the format +// `projects/{project_id}/locations/{location}/volumes/{volume_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) Create(parent string, replication *Replication) *ProjectsLocationsVolumesReplicationsCreateCall { + c := &ProjectsLocationsVolumesReplicationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.replication = replication + return c +} + +// ReplicationId sets the optional parameter "replicationId": Required. ID of +// the replication to create. Must be unique within the parent resource. Must +// contain only letters, numbers and hyphen, with the first character a letter, +// the last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsVolumesReplicationsCreateCall) ReplicationId(replicationId string) *ProjectsLocationsVolumesReplicationsCreateCall { + c.urlParams_.Set("replicationId", replicationId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesReplicationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.replication) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/replications") + 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 "netapp.projects.locations.volumes.replications.create" call. +// 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 *ProjectsLocationsVolumesReplicationsCreateCall) 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 +} + +type ProjectsLocationsVolumesReplicationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a replication. +// +// - name: The replication resource name, in the format +// `projects/*/locations/*/volumes/*/replications/{replication_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) Delete(name string) *ProjectsLocationsVolumesReplicationsDeleteCall { + c := &ProjectsLocationsVolumesReplicationsDeleteCall{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 +// details. +func (c *ProjectsLocationsVolumesReplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.volumes.replications.delete" call. +// 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 *ProjectsLocationsVolumesReplicationsDeleteCall) 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 +} + +type ProjectsLocationsVolumesReplicationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describe a replication for a volume. +// +// - name: The replication resource name, in the format +// `projects/{project_id}/locations/{location}/volumes/{volume_id}/replication +// s/{replication_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) Get(name string) *ProjectsLocationsVolumesReplicationsGetCall { + c := &ProjectsLocationsVolumesReplicationsGetCall{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 +// details. +func (c *ProjectsLocationsVolumesReplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesReplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesReplicationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.volumes.replications.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Replication.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 *ProjectsLocationsVolumesReplicationsGetCall) Do(opts ...googleapi.CallOption) (*Replication, 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 := &Replication{ + 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 +} + +type ProjectsLocationsVolumesReplicationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all replications for a volume. +// +// - parent: The volume for which to retrieve replication information, in the +// format `projects/{project_id}/locations/{location}/volumes/{volume_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) List(parent string) *ProjectsLocationsVolumesReplicationsListCall { + c := &ProjectsLocationsVolumesReplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsVolumesReplicationsListCall) Filter(filter string) *ProjectsLocationsVolumesReplicationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsVolumesReplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesReplicationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsVolumesReplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesReplicationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsVolumesReplicationsListCall) PageToken(pageToken string) *ProjectsLocationsVolumesReplicationsListCall { + 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 +// details. +func (c *ProjectsLocationsVolumesReplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesReplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesReplicationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsListCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/replications") + 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 "netapp.projects.locations.volumes.replications.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListReplicationsResponse.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 *ProjectsLocationsVolumesReplicationsListCall) Do(opts ...googleapi.CallOption) (*ListReplicationsResponse, 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 := &ListReplicationsResponse{ + 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 +} + +// 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 *ProjectsLocationsVolumesReplicationsListCall) Pages(ctx context.Context, f func(*ListReplicationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsVolumesReplicationsPatchCall struct { + s *Service + name string + replication *Replication + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the settings of a specific replication. +// +// - name: Identifier. The resource name of the Replication. Format: +// `projects/{project_id}/locations/{location}/volumes/{volume_id}/replication +// s/{replication_id}`. +func (r *ProjectsLocationsVolumesReplicationsService) Patch(name string, replication *Replication) *ProjectsLocationsVolumesReplicationsPatchCall { + c := &ProjectsLocationsVolumesReplicationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.replication = replication + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. At least one path must be supplied in this field. +func (c *ProjectsLocationsVolumesReplicationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesReplicationsPatchCall { + 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 +// details. +func (c *ProjectsLocationsVolumesReplicationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.replication) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.volumes.replications.patch" call. +// 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 *ProjectsLocationsVolumesReplicationsPatchCall) 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 +} + +type ProjectsLocationsVolumesReplicationsResumeCall struct { + s *Service + name string + resumereplicationrequest *ResumeReplicationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resume: Resume Cross Region Replication. +// +// - name: The resource name of the replication, in the format of +// projects/{project_id}/locations/{location}/volumes/{volume_id}/replications +// /{replication_id}. +func (r *ProjectsLocationsVolumesReplicationsService) Resume(name string, resumereplicationrequest *ResumeReplicationRequest) *ProjectsLocationsVolumesReplicationsResumeCall { + c := &ProjectsLocationsVolumesReplicationsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.resumereplicationrequest = resumereplicationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesReplicationsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsResumeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsResumeCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsResumeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsResumeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsResumeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumereplicationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "netapp.projects.locations.volumes.replications.resume" call. +// 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 *ProjectsLocationsVolumesReplicationsResumeCall) 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 +} + +type ProjectsLocationsVolumesReplicationsReverseDirectionCall struct { + s *Service + name string + reversereplicationdirectionrequest *ReverseReplicationDirectionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ReverseDirection: Reverses direction of replication. Source becomes +// destination and destination becomes source. +// +// - name: The resource name of the replication, in the format of +// projects/{project_id}/locations/{location}/volumes/{volume_id}/replications +// /{replication_id}. +func (r *ProjectsLocationsVolumesReplicationsService) ReverseDirection(name string, reversereplicationdirectionrequest *ReverseReplicationDirectionRequest) *ProjectsLocationsVolumesReplicationsReverseDirectionCall { + c := &ProjectsLocationsVolumesReplicationsReverseDirectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.reversereplicationdirectionrequest = reversereplicationdirectionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesReplicationsReverseDirectionCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsReverseDirectionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsReverseDirectionCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsReverseDirectionCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsReverseDirectionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsReverseDirectionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reversereplicationdirectionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:reverseDirection") + 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 "netapp.projects.locations.volumes.replications.reverseDirection" call. +// 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 *ProjectsLocationsVolumesReplicationsReverseDirectionCall) 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 +} + +type ProjectsLocationsVolumesReplicationsStopCall struct { + s *Service + name string + stopreplicationrequest *StopReplicationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stop Cross Region Replication. +// +// - name: The resource name of the replication, in the format of +// projects/{project_id}/locations/{location}/volumes/{volume_id}/replications +// /{replication_id}. +func (r *ProjectsLocationsVolumesReplicationsService) Stop(name string, stopreplicationrequest *StopReplicationRequest) *ProjectsLocationsVolumesReplicationsStopCall { + c := &ProjectsLocationsVolumesReplicationsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.stopreplicationrequest = stopreplicationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesReplicationsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesReplicationsStopCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesReplicationsStopCall) Context(ctx context.Context) *ProjectsLocationsVolumesReplicationsStopCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesReplicationsStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesReplicationsStopCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopreplicationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:stop") + 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 "netapp.projects.locations.volumes.replications.stop" call. +// 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 *ProjectsLocationsVolumesReplicationsStopCall) 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 +} + +type ProjectsLocationsVolumesSnapshotsCreateCall struct { + s *Service + parent string + snapshot *Snapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a new snapshot for a volume. +// +// - parent: The NetApp volume to create the snapshots of, in the format +// `projects/{project_id}/locations/{location}/volumes/{volume_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) Create(parent string, snapshot *Snapshot) *ProjectsLocationsVolumesSnapshotsCreateCall { + c := &ProjectsLocationsVolumesSnapshotsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.snapshot = snapshot + return c +} + +// SnapshotId sets the optional parameter "snapshotId": Required. ID of the +// snapshot to create. Must be unique within the parent resource. Must contain +// only letters, numbers and hyphen, with the first character a letter, the +// last a letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) SnapshotId(snapshotId string) *ProjectsLocationsVolumesSnapshotsCreateCall { + c.urlParams_.Set("snapshotId", snapshotId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/snapshots") + 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 "netapp.projects.locations.volumes.snapshots.create" call. +// 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 *ProjectsLocationsVolumesSnapshotsCreateCall) 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 +} + +type ProjectsLocationsVolumesSnapshotsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a snapshot. +// +// - name: The snapshot resource name, in the format +// `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) Delete(name string) *ProjectsLocationsVolumesSnapshotsDeleteCall { + c := &ProjectsLocationsVolumesSnapshotsDeleteCall{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 +// details. +func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("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 "netapp.projects.locations.volumes.snapshots.delete" call. +// 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 *ProjectsLocationsVolumesSnapshotsDeleteCall) 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 +} + +type ProjectsLocationsVolumesSnapshotsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describe a snapshot for a volume. +// +// - name: The snapshot resource name, in the format +// `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{ +// snapshot_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) Get(name string) *ProjectsLocationsVolumesSnapshotsGetCall { + c := &ProjectsLocationsVolumesSnapshotsGetCall{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 +// details. +func (c *ProjectsLocationsVolumesSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesSnapshotsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "netapp.projects.locations.volumes.snapshots.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Snapshot.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 *ProjectsLocationsVolumesSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, 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 := &Snapshot{ + 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 +} + +type ProjectsLocationsVolumesSnapshotsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns descriptions of all snapshots for a volume. +// +// - parent: The volume for which to retrieve snapshot information, in the +// format `projects/{project_id}/locations/{location}/volumes/{volume_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) List(parent string) *ProjectsLocationsVolumesSnapshotsListCall { + c := &ProjectsLocationsVolumesSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsVolumesSnapshotsListCall) Filter(filter string) *ProjectsLocationsVolumesSnapshotsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. Supported +// values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsVolumesSnapshotsListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesSnapshotsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. +func (c *ProjectsLocationsVolumesSnapshotsListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesSnapshotsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// to use if there are additional results to retrieve for this list request. +func (c *ProjectsLocationsVolumesSnapshotsListCall) PageToken(pageToken string) *ProjectsLocationsVolumesSnapshotsListCall { + 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 +// details. +func (c *ProjectsLocationsVolumesSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsVolumesSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesSnapshotsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsListCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/snapshots") + 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 "netapp.projects.locations.volumes.snapshots.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListSnapshotsResponse.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 *ProjectsLocationsVolumesSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotsResponse, 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 := &ListSnapshotsResponse{ + 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 +} + +// 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 *ProjectsLocationsVolumesSnapshotsListCall) Pages(ctx context.Context, f func(*ListSnapshotsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsVolumesSnapshotsPatchCall struct { + s *Service + name string + snapshot *Snapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the settings of a specific snapshot. +// +// - name: Identifier. The resource name of the snapshot. Format: +// `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{ +// snapshot_id}`. +func (r *ProjectsLocationsVolumesSnapshotsService) Patch(name string, snapshot *Snapshot) *ProjectsLocationsVolumesSnapshotsPatchCall { + c := &ProjectsLocationsVolumesSnapshotsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.snapshot = snapshot + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. At least one path must be supplied in this field. +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesSnapshotsPatchCall { + 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 +// details. +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesSnapshotsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) + if err != nil { + return nil, err + } + 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 "netapp.projects.locations.volumes.snapshots.patch" call. +// 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 *ProjectsLocationsVolumesSnapshotsPatchCall) 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 +} diff --git a/places/v1/places-api.json b/places/v1/places-api.json index 2865f97752a..1e04a4a68d9 100644 --- a/places/v1/places-api.json +++ b/places/v1/places-api.json @@ -280,7 +280,7 @@ } } }, - "revision": "20240920", + "revision": "20241013", "rootUrl": "https://places.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { @@ -298,6 +298,120 @@ }, "type": "object" }, + "GoogleMapsPlacesV1AddressDescriptor": { + "description": "A relational description of a location. Includes a ranked set of nearby landmarks and precise containing areas and their relationship to the target location.", + "id": "GoogleMapsPlacesV1AddressDescriptor", + "properties": { + "areas": { + "description": "A ranked list of containing or adjacent areas. The most recognizable and precise areas are ranked first.", + "items": { + "$ref": "GoogleMapsPlacesV1AddressDescriptorArea" + }, + "type": "array" + }, + "landmarks": { + "description": "A ranked list of nearby landmarks. The most recognizable and nearby landmarks are ranked first.", + "items": { + "$ref": "GoogleMapsPlacesV1AddressDescriptorLandmark" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AddressDescriptorArea": { + "description": "Area information and the area's relationship with the target location. Areas includes precise sublocality, neighborhoods, and large compounds that are useful for describing a location.", + "id": "GoogleMapsPlacesV1AddressDescriptorArea", + "properties": { + "containment": { + "description": "Defines the spatial relationship between the target location and the area.", + "enum": [ + "CONTAINMENT_UNSPECIFIED", + "WITHIN", + "OUTSKIRTS", + "NEAR" + ], + "enumDescriptions": [ + "The containment is unspecified.", + "The target location is within the area region, close to the center.", + "The target location is within the area region, close to the edge.", + "The target location is outside the area region, but close by." + ], + "type": "string" + }, + "displayName": { + "$ref": "GoogleTypeLocalizedText", + "description": "The area's display name." + }, + "name": { + "description": "The area's resource name.", + "type": "string" + }, + "placeId": { + "description": "The area's place id.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AddressDescriptorLandmark": { + "description": "Basic landmark information and the landmark's relationship with the target location. Landmarks are prominent places that can be used to describe a location.", + "id": "GoogleMapsPlacesV1AddressDescriptorLandmark", + "properties": { + "displayName": { + "$ref": "GoogleTypeLocalizedText", + "description": "The landmark's display name." + }, + "name": { + "description": "The landmark's resource name.", + "type": "string" + }, + "placeId": { + "description": "The landmark's place id.", + "type": "string" + }, + "spatialRelationship": { + "description": "Defines the spatial relationship between the target location and the landmark.", + "enum": [ + "NEAR", + "WITHIN", + "BESIDE", + "ACROSS_THE_ROAD", + "DOWN_THE_ROAD", + "AROUND_THE_CORNER", + "BEHIND" + ], + "enumDescriptions": [ + "This is the default relationship when nothing more specific below applies.", + "The landmark has a spatial geometry and the target is within its bounds.", + "The target is directly adjacent to the landmark.", + "The target is directly opposite the landmark on the other side of the road.", + "On the same route as the landmark but not besides or across.", + "Not on the same route as the landmark but a single turn away.", + "Close to the landmark's structure but further away from its street entrances." + ], + "type": "string" + }, + "straightLineDistanceMeters": { + "description": "The straight line distance in meters between the target location and the landmark.", + "format": "float", + "type": "number" + }, + "travelDistanceMeters": { + "description": "The travel distance in meters along the road network if known. This does not take into account the mode of transportation (walking/driving).", + "format": "float", + "type": "number" + }, + "types": { + "description": "A set of type tags for this landmark. For a complete list of possible values, see https://developers.google.com/maps/documentation/places/web-service/place-types.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleMapsPlacesV1AuthorAttribution": { "description": "Information about the author of the UGC data. Used in Photo, and Review.", "id": "GoogleMapsPlacesV1AuthorAttribution", @@ -890,6 +1004,10 @@ }, "type": "array" }, + "addressDescriptor": { + "$ref": "GoogleMapsPlacesV1AddressDescriptor", + "description": "The address descriptor of the place. Address descriptors include additional information that help describe a location using landmarks and areas. See address descriptor regional coverage in https://developers.google.com/maps/documentation/geocoding/address-descriptors/coverage." + }, "adrFormatAddress": { "description": "The place's address in adr microformat: http://microformats.org/wiki/adr.", "type": "string" diff --git a/places/v1/places-gen.go b/places/v1/places-gen.go index 4876f506eb6..d28fa26a73b 100644 --- a/places/v1/places-gen.go +++ b/places/v1/places-gen.go @@ -248,6 +248,147 @@ func (s GoogleGeoTypeViewport) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleMapsPlacesV1AddressDescriptor: A relational description of a location. +// Includes a ranked set of nearby landmarks and precise containing areas and +// their relationship to the target location. +type GoogleMapsPlacesV1AddressDescriptor struct { + // Areas: A ranked list of containing or adjacent areas. The most recognizable + // and precise areas are ranked first. + Areas []*GoogleMapsPlacesV1AddressDescriptorArea `json:"areas,omitempty"` + // Landmarks: A ranked list of nearby landmarks. The most recognizable and + // nearby landmarks are ranked first. + Landmarks []*GoogleMapsPlacesV1AddressDescriptorLandmark `json:"landmarks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Areas") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Areas") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleMapsPlacesV1AddressDescriptor) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AddressDescriptor + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AddressDescriptorArea: Area information and the area's +// relationship with the target location. Areas includes precise sublocality, +// neighborhoods, and large compounds that are useful for describing a +// location. +type GoogleMapsPlacesV1AddressDescriptorArea struct { + // Containment: Defines the spatial relationship between the target location + // and the area. + // + // Possible values: + // "CONTAINMENT_UNSPECIFIED" - The containment is unspecified. + // "WITHIN" - The target location is within the area region, close to the + // center. + // "OUTSKIRTS" - The target location is within the area region, close to the + // edge. + // "NEAR" - The target location is outside the area region, but close by. + Containment string `json:"containment,omitempty"` + // DisplayName: The area's display name. + DisplayName *GoogleTypeLocalizedText `json:"displayName,omitempty"` + // Name: The area's resource name. + Name string `json:"name,omitempty"` + // PlaceId: The area's place id. + PlaceId string `json:"placeId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Containment") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Containment") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleMapsPlacesV1AddressDescriptorArea) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AddressDescriptorArea + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AddressDescriptorLandmark: Basic landmark information and +// the landmark's relationship with the target location. Landmarks are +// prominent places that can be used to describe a location. +type GoogleMapsPlacesV1AddressDescriptorLandmark struct { + // DisplayName: The landmark's display name. + DisplayName *GoogleTypeLocalizedText `json:"displayName,omitempty"` + // Name: The landmark's resource name. + Name string `json:"name,omitempty"` + // PlaceId: The landmark's place id. + PlaceId string `json:"placeId,omitempty"` + // SpatialRelationship: Defines the spatial relationship between the target + // location and the landmark. + // + // Possible values: + // "NEAR" - This is the default relationship when nothing more specific below + // applies. + // "WITHIN" - The landmark has a spatial geometry and the target is within + // its bounds. + // "BESIDE" - The target is directly adjacent to the landmark. + // "ACROSS_THE_ROAD" - The target is directly opposite the landmark on the + // other side of the road. + // "DOWN_THE_ROAD" - On the same route as the landmark but not besides or + // across. + // "AROUND_THE_CORNER" - Not on the same route as the landmark but a single + // turn away. + // "BEHIND" - Close to the landmark's structure but further away from its + // street entrances. + SpatialRelationship string `json:"spatialRelationship,omitempty"` + // StraightLineDistanceMeters: The straight line distance in meters between the + // target location and the landmark. + StraightLineDistanceMeters float64 `json:"straightLineDistanceMeters,omitempty"` + // TravelDistanceMeters: The travel distance in meters along the road network + // if known. This does not take into account the mode of transportation + // (walking/driving). + TravelDistanceMeters float64 `json:"travelDistanceMeters,omitempty"` + // Types: A set of type tags for this landmark. For a complete list of possible + // values, see + // https://developers.google.com/maps/documentation/places/web-service/place-types. + Types []string `json:"types,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleMapsPlacesV1AddressDescriptorLandmark) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AddressDescriptorLandmark + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleMapsPlacesV1AddressDescriptorLandmark) UnmarshalJSON(data []byte) error { + type NoMethod GoogleMapsPlacesV1AddressDescriptorLandmark + var s1 struct { + StraightLineDistanceMeters gensupport.JSONFloat64 `json:"straightLineDistanceMeters"` + TravelDistanceMeters gensupport.JSONFloat64 `json:"travelDistanceMeters"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.StraightLineDistanceMeters = float64(s1.StraightLineDistanceMeters) + s.TravelDistanceMeters = float64(s1.TravelDistanceMeters) + return nil +} + // GoogleMapsPlacesV1AuthorAttribution: Information about the author of the UGC // data. Used in Photo, and Review. type GoogleMapsPlacesV1AuthorAttribution struct { @@ -1147,6 +1288,11 @@ type GoogleMapsPlacesV1Place struct { // type of the component can change. A particular component may be missing in a // later response. AddressComponents []*GoogleMapsPlacesV1PlaceAddressComponent `json:"addressComponents,omitempty"` + // AddressDescriptor: The address descriptor of the place. Address descriptors + // include additional information that help describe a location using landmarks + // and areas. See address descriptor regional coverage in + // https://developers.google.com/maps/documentation/geocoding/address-descriptors/coverage. + AddressDescriptor *GoogleMapsPlacesV1AddressDescriptor `json:"addressDescriptor,omitempty"` // AdrFormatAddress: The place's address in adr microformat: // http://microformats.org/wiki/adr. AdrFormatAddress string `json:"adrFormatAddress,omitempty"` diff --git a/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-api.json b/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-api.json index 9290f1fbe6b..8f572514fc4 100644 --- a/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-api.json +++ b/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-api.json @@ -207,7 +207,7 @@ } } }, - "revision": "20230216", + "revision": "20241014", "rootUrl": "https://readerrevenuesubscriptionlinking.googleapis.com/", "schemas": { "DeleteReaderResponse": { @@ -225,7 +225,7 @@ "type": "string" }, "expireTime": { - "description": "Required. Expiration time of the entitlement. Entitlements that have expired over 30 days will be purged. Required. LINT.IfChange(expire_time) The max expire_time is 398 days from now(). LINT.ThenChange(//depot/google3/java/com/google/subscribewithgoogle/accountlinking/subscriptionlink/service/config/protoconf.pi:max_expiry_age)", + "description": "Required. Expiration time of the entitlement. Entitlements that have expired over 30 days will be purged. The max expire_time is 398 days from now(). LINT.ThenChange(//depot/google3/java/com/google/subscribewithgoogle/accountlinking/subscriptionlink/service/config/protoconf.pi:max_expiry_age)", "format": "google-datetime", "type": "string" }, diff --git a/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-gen.go b/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-gen.go index 3154e976832..9e66760b8f0 100644 --- a/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-gen.go +++ b/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-gen.go @@ -178,8 +178,8 @@ type Entitlement struct { // limit. Detail string `json:"detail,omitempty"` // ExpireTime: Required. Expiration time of the entitlement. Entitlements that - // have expired over 30 days will be purged. Required. - // LINT.IfChange(expire_time) The max expire_time is 398 days from now(). + // have expired over 30 days will be purged. The max expire_time is 398 days + // from now(). // LINT.ThenChange(//depot/google3/java/com/google/subscribewithgoogle/accountli // nking/subscriptionlink/service/config/protoconf.pi:max_expiry_age) ExpireTime string `json:"expireTime,omitempty"` diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 653ca4d6207..1f90f6a482c 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -786,7 +786,7 @@ } } }, - "revision": "20240906", + "revision": "20241013", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -1854,6 +1854,23 @@ "description": "Risk analysis result for an event.", "id": "GoogleCloudRecaptchaenterpriseV1RiskAnalysis", "properties": { + "challenge": { + "description": "Output only. Challenge information for SCORE_AND_CHALLENGE keys", + "enum": [ + "CHALLENGE_UNSPECIFIED", + "NOCAPTCHA", + "PASSED", + "FAILED" + ], + "enumDescriptions": [ + "Default unspecified type.", + "No challenge was presented for solving.", + "A solution was submitted that was correct.", + "A solution was submitted that was incorrect or otherwise deemed suspicious." + ], + "readOnly": true, + "type": "string" + }, "extendedVerdictReasons": { "description": "Output only. Extended verdict reasons to be used for experimentation only. The set of possible reasons is subject to change.", "items": { diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index 9a4564d0865..549e28b0dee 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -1766,6 +1766,15 @@ func (s GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse) Marshal // GoogleCloudRecaptchaenterpriseV1RiskAnalysis: Risk analysis result for an // event. type GoogleCloudRecaptchaenterpriseV1RiskAnalysis struct { + // Challenge: Output only. Challenge information for SCORE_AND_CHALLENGE keys + // + // Possible values: + // "CHALLENGE_UNSPECIFIED" - Default unspecified type. + // "NOCAPTCHA" - No challenge was presented for solving. + // "PASSED" - A solution was submitted that was correct. + // "FAILED" - A solution was submitted that was incorrect or otherwise deemed + // suspicious. + Challenge string `json:"challenge,omitempty"` // ExtendedVerdictReasons: Output only. Extended verdict reasons to be used for // experimentation only. The set of possible reasons is subject to change. ExtendedVerdictReasons []string `json:"extendedVerdictReasons,omitempty"` @@ -1791,15 +1800,15 @@ type GoogleCloudRecaptchaenterpriseV1RiskAnalysis struct { // likely legitimate traffic while 0.0 means very likely non-legitimate // traffic). Score float64 `json:"score,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExtendedVerdictReasons") to + // ForceSendFields is a list of field names (e.g. "Challenge") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExtendedVerdictReasons") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "Challenge") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/recommender/v1/recommender-api.json b/recommender/v1/recommender-api.json index e4c7dbf796f..90fe6a5d842 100644 --- a/recommender/v1/recommender-api.json +++ b/recommender/v1/recommender-api.json @@ -1686,7 +1686,7 @@ } } }, - "revision": "20240428", + "revision": "20241013", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1CostProjection": { @@ -1739,6 +1739,13 @@ "$ref": "GoogleCloudRecommenderV1CostProjection", "description": "Use with CategoryType.COST" }, + "impactComponents": { + "description": "If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.", + "items": { + "$ref": "GoogleCloudRecommenderV1Impact" + }, + "type": "array" + }, "reliabilityProjection": { "$ref": "GoogleCloudRecommenderV1ReliabilityProjection", "description": "Use with CategoryType.RELIABILITY" @@ -1747,6 +1754,10 @@ "$ref": "GoogleCloudRecommenderV1SecurityProjection", "description": "Use with CategoryType.SECURITY" }, + "service": { + "description": "The service that this impact is associated with.", + "type": "string" + }, "sustainabilityProjection": { "$ref": "GoogleCloudRecommenderV1SustainabilityProjection", "description": "Use with CategoryType.SUSTAINABILITY" diff --git a/recommender/v1/recommender-gen.go b/recommender/v1/recommender-gen.go index b4d53a01d4e..729297bfbdc 100644 --- a/recommender/v1/recommender-gen.go +++ b/recommender/v1/recommender-gen.go @@ -489,10 +489,16 @@ type GoogleCloudRecommenderV1Impact struct { Category string `json:"category,omitempty"` // CostProjection: Use with CategoryType.COST CostProjection *GoogleCloudRecommenderV1CostProjection `json:"costProjection,omitempty"` + // ImpactComponents: If populated, the impact contains multiple components. In + // this case, the top-level impact contains aggregated values and each + // component contains per-service details. + ImpactComponents []*GoogleCloudRecommenderV1Impact `json:"impactComponents,omitempty"` // ReliabilityProjection: Use with CategoryType.RELIABILITY ReliabilityProjection *GoogleCloudRecommenderV1ReliabilityProjection `json:"reliabilityProjection,omitempty"` // SecurityProjection: Use with CategoryType.SECURITY SecurityProjection *GoogleCloudRecommenderV1SecurityProjection `json:"securityProjection,omitempty"` + // Service: The service that this impact is associated with. + Service string `json:"service,omitempty"` // SustainabilityProjection: Use with CategoryType.SUSTAINABILITY SustainabilityProjection *GoogleCloudRecommenderV1SustainabilityProjection `json:"sustainabilityProjection,omitempty"` // ForceSendFields is a list of field names (e.g. "Category") to diff --git a/sheets/v4/sheets-api.json b/sheets/v4/sheets-api.json index 10efa6e4947..b2fc7f7b1da 100644 --- a/sheets/v4/sheets-api.json +++ b/sheets/v4/sheets-api.json @@ -870,7 +870,7 @@ } } }, - "revision": "20241001", + "revision": "20241008", "rootUrl": "https://sheets.googleapis.com/", "schemas": { "AddBandingRequest": { @@ -7182,22 +7182,22 @@ "id": "TimeOfDay", "properties": { "hours": { - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "description": "Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", "format": "int32", "type": "integer" }, "minutes": { - "description": "Minutes of hour of day. Must be from 0 to 59.", + "description": "Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.", "format": "int32", "type": "integer" }, "nanos": { - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "description": "Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.", "format": "int32", "type": "integer" }, "seconds": { - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "description": "Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.", "format": "int32", "type": "integer" } diff --git a/sheets/v4/sheets-gen.go b/sheets/v4/sheets-gen.go index c2613caddb7..d1c8fadc988 100644 --- a/sheets/v4/sheets-gen.go +++ b/sheets/v4/sheets-gen.go @@ -8205,16 +8205,19 @@ func (s ThemeColorPair) MarshalJSON() ([]byte, error) { // significant or are specified elsewhere. An API may choose to allow leap // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. type TimeOfDay struct { - // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may - // choose to allow the value "24:00:00" for scenarios like business closing - // time. + // Hours: Hours of a day in 24 hour format. Must be greater than or equal to 0 + // and typically must be less than or equal to 23. An API may choose to allow + // the value "24:00:00" for scenarios like business closing time. Hours int64 `json:"hours,omitempty"` - // Minutes: Minutes of hour of day. Must be from 0 to 59. + // Minutes: Minutes of an hour. Must be greater than or equal to 0 and less + // than or equal to 59. Minutes int64 `json:"minutes,omitempty"` - // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + // Nanos: Fractions of seconds, in nanoseconds. Must be greater than or equal + // to 0 and less than or equal to 999,999,999. Nanos int64 `json:"nanos,omitempty"` - // Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An - // API may allow the value 60 if it allows leap-seconds. + // Seconds: Seconds of a minute. Must be greater than or equal to 0 and + // typically must be less than or equal to 59. An API may allow the value 60 if + // it allows leap-seconds. Seconds int64 `json:"seconds,omitempty"` // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index c69e213bdf2..08f37d504b9 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -37,6 +37,11 @@ "endpointUrl": "https://spanner.us-central1.rep.googleapis.com/", "location": "us-central1" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://spanner.us-central2.rep.googleapis.com/", + "location": "us-central2" + }, { "description": "Regional Endpoint", "endpointUrl": "https://spanner.us-east1.rep.googleapis.com/", @@ -52,6 +57,11 @@ "endpointUrl": "https://spanner.us-east5.rep.googleapis.com/", "location": "us-east5" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://spanner.us-east7.rep.googleapis.com/", + "location": "us-east7" + }, { "description": "Regional Endpoint", "endpointUrl": "https://spanner.us-south1.rep.googleapis.com/", @@ -67,6 +77,11 @@ "endpointUrl": "https://spanner.us-west2.rep.googleapis.com/", "location": "us-west2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://spanner.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, { "description": "Regional Endpoint", "endpointUrl": "https://spanner.us-west4.rep.googleapis.com/", @@ -3304,13 +3319,35 @@ } } }, - "revision": "20240930", + "revision": "20241010", "rootUrl": "https://spanner.googleapis.com/", "schemas": { + "AsymmetricAutoscalingOption": { + "description": "AsymmetricAutoscalingOption specifies the scaling of replicas identified by the given selection.", + "id": "AsymmetricAutoscalingOption", + "properties": { + "overrides": { + "$ref": "AutoscalingConfigOverrides", + "description": "Optional. Overrides applied to the top-level autoscaling configuration for the selected replicas." + }, + "replicaSelection": { + "$ref": "InstanceReplicaSelection", + "description": "Required. Selects the replicas to which this AsymmetricAutoscalingOption applies. Only read-only replicas are supported." + } + }, + "type": "object" + }, "AutoscalingConfig": { "description": "Autoscaling configuration for an instance.", "id": "AutoscalingConfig", "properties": { + "asymmetricAutoscalingOptions": { + "description": "Optional. Optional asymmetric autoscaling options. Replicas matching the replica selection criteria will be autoscaled independently from other replicas. The autoscaler will scale the replicas based on the utilization of replicas identified by the replica selection. Replica selections should not overlap with each other. Other replicas (those do not match any replica selection) will be autoscaled together and will have the same compute capacity allocated to them.", + "items": { + "$ref": "AsymmetricAutoscalingOption" + }, + "type": "array" + }, "autoscalingLimits": { "$ref": "AutoscalingLimits", "description": "Required. Autoscaling limits for an instance." @@ -3322,6 +3359,22 @@ }, "type": "object" }, + "AutoscalingConfigOverrides": { + "description": "Overrides the top-level autoscaling configuration for the replicas identified by `replica_selection`. All fields in this message are optional. Any unspecified fields will use the corresponding values from the top-level autoscaling configuration.", + "id": "AutoscalingConfigOverrides", + "properties": { + "autoscalingLimits": { + "$ref": "AutoscalingLimits", + "description": "Optional. If specified, overrides the min/max limit in the top-level autoscaling configuration for the selected replicas." + }, + "autoscalingTargetHighPriorityCpuUtilizationPercent": { + "description": "Optional. If specified, overrides the autoscaling target high_priority_cpu_utilization_percent in the top-level autoscaling configuration for the selected replicas.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "AutoscalingLimits": { "description": "The autoscaling limits for the instance. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.", "id": "AutoscalingLimits", @@ -4582,12 +4635,16 @@ "enum": [ "NORMAL", "PLAN", - "PROFILE" + "PROFILE", + "WITH_STATS", + "WITH_PLAN_AND_STATS" ], "enumDescriptions": [ "The default mode. Only the statement results are returned.", "This mode returns only the query plan, without any results or execution statistics information.", - "This mode returns the query plan, overall execution statistics, operator level execution statistics along with the results. This has a performance overhead compared to the other modes. It is not recommended to use this mode for production traffic." + "This mode returns the query plan, overall execution statistics, operator level execution statistics along with the results. This has a performance overhead compared to the other modes. It is not recommended to use this mode for production traffic.", + "This mode returns the overall (but not operator-level) execution statistics along with the results.", + "This mode returns the query plan, overall (but not operator-level) execution statistics along with the results." ], "type": "string" }, @@ -4886,15 +4943,23 @@ "type": "string" }, "nodeCount": { - "description": "The number of nodes allocated to this instance. At most, one of either `node_count` or `processing_units` should be present in the message. Users can set the `node_count` field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` field and reflects the current number of nodes allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. For more information, see [Compute capacity, nodes, and processing units](https://cloud.google.com/spanner/docs/compute-capacity).", + "description": "The number of nodes allocated to this instance. At most, one of either `node_count` or `processing_units` should be present in the message. Users can set the `node_count` field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` field and reflects the current number of nodes allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. If the instance has varying node count across replicas (achieved by setting asymmetric_autoscaling_options in autoscaling config), the node_count here is the maximum node count across all replicas. For more information, see [Compute capacity, nodes, and processing units](https://cloud.google.com/spanner/docs/compute-capacity).", "format": "int32", "type": "integer" }, "processingUnits": { - "description": "The number of processing units allocated to this instance. At most, one of either `processing_units` or `node_count` should be present in the message. Users can set the `processing_units` field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and reflects the current number of processing units allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. For more information, see [Compute capacity, nodes and processing units](https://cloud.google.com/spanner/docs/compute-capacity).", + "description": "The number of processing units allocated to this instance. At most, one of either `processing_units` or `node_count` should be present in the message. Users can set the `processing_units` field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and reflects the current number of processing units allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. If the instance has varying processing units per replica (achieved by setting asymmetric_autoscaling_options in autoscaling config), the processing_units here is the maximum processing units across all replicas. For more information, see [Compute capacity, nodes and processing units](https://cloud.google.com/spanner/docs/compute-capacity).", "format": "int32", "type": "integer" }, + "replicaComputeCapacity": { + "description": "Output only. Lists the compute capacity per ReplicaSelection. A replica selection identifies a set of replicas with common properties. Replicas identified by a ReplicaSelection are scaled with the same compute capacity.", + "items": { + "$ref": "ReplicaComputeCapacity" + }, + "readOnly": true, + "type": "array" + }, "state": { "description": "Output only. The current instance state. For CreateInstance, the state must be either omitted or set to `CREATING`. For UpdateInstance, the state must be either omitted or set to `READY`.", "enum": [ @@ -5147,6 +5212,17 @@ }, "type": "object" }, + "InstanceReplicaSelection": { + "description": "ReplicaSelection identifies replicas with common properties.", + "id": "InstanceReplicaSelection", + "properties": { + "location": { + "description": "Required. Name of the location of the replicas (e.g., \"us-central1\").", + "type": "string" + } + }, + "type": "object" + }, "KeyRange": { "description": "KeyRange represents a range of rows in a table or index. A range has a start key and an end key. These keys can be open or closed, indicating if the range includes rows with that key. Keys are represented by lists, where the ith value in the list corresponds to the ith component of the table or index primary key. Individual values are encoded as described here. For example, consider the following table definition: CREATE TABLE UserEvents ( UserName STRING(MAX), EventDate STRING(10) ) PRIMARY KEY(UserName, EventDate); The following keys name rows in this table: \"Bob\", \"2014-09-23\" Since the `UserEvents` table's `PRIMARY KEY` clause names two columns, each `UserEvents` key has two elements; the first is the `UserName`, and the second is the `EventDate`. Key ranges with multiple components are interpreted lexicographically by component using the table or index key's declared sort order. For example, the following range returns all events for user `\"Bob\"` that occurred in the year 2015: \"start_closed\": [\"Bob\", \"2015-01-01\"] \"end_closed\": [\"Bob\", \"2015-12-31\"] Start and end keys can omit trailing key components. This affects the inclusion and exclusion of rows that exactly match the provided key components: if the key is closed, then rows that exactly match the provided components are included; if the key is open, then rows that exactly match are not included. For example, the following range includes all events for `\"Bob\"` that occurred during and after the year 2000: \"start_closed\": [\"Bob\", \"2000-01-01\"] \"end_closed\": [\"Bob\"] The next example retrieves all events for `\"Bob\"`: \"start_closed\": [\"Bob\"] \"end_closed\": [\"Bob\"] To retrieve events before the year 2000: \"start_closed\": [\"Bob\"] \"end_open\": [\"Bob\", \"2000-01-01\"] The following range includes all rows in the table: \"start_closed\": [] \"end_closed\": [] This range returns all users whose `UserName` begins with any character from A to C: \"start_closed\": [\"A\"] \"end_open\": [\"D\"] This range returns all users whose `UserName` begins with B: \"start_closed\": [\"B\"] \"end_open\": [\"C\"] Key ranges honor column sort order. For example, suppose a table is defined as follows: CREATE TABLE DescendingSortedTable { Key INT64, ... ) PRIMARY KEY(Key DESC); The following range retrieves all rows with key values between 1 and 100 inclusive: \"start_closed\": [\"100\"] \"end_closed\": [\"1\"] Note that 100 is passed as the start, and 1 is passed as the end, because `Key` is a descending column in the schema.", "id": "KeyRange", @@ -6321,6 +6397,27 @@ }, "type": "object" }, + "ReplicaComputeCapacity": { + "description": "ReplicaComputeCapacity describes the amount of server resources that are allocated to each replica identified by the replica selection.", + "id": "ReplicaComputeCapacity", + "properties": { + "nodeCount": { + "description": "The number of nodes allocated to each replica. This may be zero in API responses for instances that are not yet in state `READY`.", + "format": "int32", + "type": "integer" + }, + "processingUnits": { + "description": "The number of processing units allocated to each replica. This may be zero in API responses for instances that are not yet in state `READY`.", + "format": "int32", + "type": "integer" + }, + "replicaSelection": { + "$ref": "InstanceReplicaSelection", + "description": "Required. Identifies replicas by specified properties. All replicas in the selection have the same amount of compute capacity." + } + }, + "type": "object" + }, "ReplicaInfo": { "id": "ReplicaInfo", "properties": { @@ -6927,7 +7024,8 @@ "NUMERIC", "JSON", "PROTO", - "ENUM" + "ENUM", + "INTERVAL" ], "enumDescriptions": [ "Not specified.", @@ -6944,7 +7042,8 @@ "Encoded as `string`, in decimal format or scientific notation format. Decimal format: `[+-]Digits[.[Digits]]` or `+-.Digits` Scientific notation: `[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or `+-.Digits[ExponentIndicator[+-]Digits]` (ExponentIndicator is `\"e\"` or `\"E\"`)", "Encoded as a JSON-formatted `string` as described in RFC 7159. The following rules are applied when parsing JSON input: - Whitespace characters are not preserved. - If a JSON object has duplicate keys, only the first key is preserved. - Members of a JSON object are not guaranteed to have their order preserved. - JSON array elements will have their order preserved.", "Encoded as a base64-encoded `string`, as described in RFC 4648, section 4.", - "Encoded as `string`, in decimal format." + "Encoded as `string`, in decimal format.", + "Encoded as `string`, in `ISO8601` duration format - `P[n]Y[n]M[n]DT[n]H[n]M[n[.fraction]]S` where `n` is an integer. For example, `P1Y2M3DT4H5M6.5S` represents time duration of 1 year, 2 months, 3 days, 4 hours, 5 minutes, and 6.5 seconds." ], "type": "string" }, diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 444ab675982..9ee3ed9a41e 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -418,12 +418,77 @@ type ScansService struct { s *Service } +// AsymmetricAutoscalingOption: AsymmetricAutoscalingOption specifies the +// scaling of replicas identified by the given selection. +type AsymmetricAutoscalingOption struct { + // Overrides: Optional. Overrides applied to the top-level autoscaling + // configuration for the selected replicas. + Overrides *AutoscalingConfigOverrides `json:"overrides,omitempty"` + // ReplicaSelection: Required. Selects the replicas to which this + // AsymmetricAutoscalingOption applies. Only read-only replicas are supported. + ReplicaSelection *InstanceReplicaSelection `json:"replicaSelection,omitempty"` + // ForceSendFields is a list of field names (e.g. "Overrides") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Overrides") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AsymmetricAutoscalingOption) MarshalJSON() ([]byte, error) { + type NoMethod AsymmetricAutoscalingOption + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // AutoscalingConfig: Autoscaling configuration for an instance. type AutoscalingConfig struct { + // AsymmetricAutoscalingOptions: Optional. Optional asymmetric autoscaling + // options. Replicas matching the replica selection criteria will be autoscaled + // independently from other replicas. The autoscaler will scale the replicas + // based on the utilization of replicas identified by the replica selection. + // Replica selections should not overlap with each other. Other replicas (those + // do not match any replica selection) will be autoscaled together and will + // have the same compute capacity allocated to them. + AsymmetricAutoscalingOptions []*AsymmetricAutoscalingOption `json:"asymmetricAutoscalingOptions,omitempty"` // AutoscalingLimits: Required. Autoscaling limits for an instance. AutoscalingLimits *AutoscalingLimits `json:"autoscalingLimits,omitempty"` // AutoscalingTargets: Required. The autoscaling targets for an instance. AutoscalingTargets *AutoscalingTargets `json:"autoscalingTargets,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "AsymmetricAutoscalingOptions") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AsymmetricAutoscalingOptions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutoscalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod AutoscalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AutoscalingConfigOverrides: Overrides the top-level autoscaling +// configuration for the replicas identified by `replica_selection`. All fields +// in this message are optional. Any unspecified fields will use the +// corresponding values from the top-level autoscaling configuration. +type AutoscalingConfigOverrides struct { + // AutoscalingLimits: Optional. If specified, overrides the min/max limit in + // the top-level autoscaling configuration for the selected replicas. + AutoscalingLimits *AutoscalingLimits `json:"autoscalingLimits,omitempty"` + // AutoscalingTargetHighPriorityCpuUtilizationPercent: Optional. If specified, + // overrides the autoscaling target high_priority_cpu_utilization_percent in + // the top-level autoscaling configuration for the selected replicas. + AutoscalingTargetHighPriorityCpuUtilizationPercent int64 `json:"autoscalingTargetHighPriorityCpuUtilizationPercent,omitempty"` // ForceSendFields is a list of field names (e.g. "AutoscalingLimits") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -437,8 +502,8 @@ type AutoscalingConfig struct { NullFields []string `json:"-"` } -func (s AutoscalingConfig) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingConfig +func (s AutoscalingConfigOverrides) MarshalJSON() ([]byte, error) { + type NoMethod AutoscalingConfigOverrides return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -2328,6 +2393,10 @@ type ExecuteSqlRequest struct { // statistics, operator level execution statistics along with the results. This // has a performance overhead compared to the other modes. It is not // recommended to use this mode for production traffic. + // "WITH_STATS" - This mode returns the overall (but not operator-level) + // execution statistics along with the results. + // "WITH_PLAN_AND_STATS" - This mode returns the query plan, overall (but not + // operator-level) execution statistics along with the results. QueryMode string `json:"queryMode,omitempty"` // QueryOptions: Query optimizer configuration to use for the given query. QueryOptions *QueryOptions `json:"queryOptions,omitempty"` @@ -2783,9 +2852,11 @@ type Instance struct { // allocated to the instance. If autoscaling is enabled, `node_count` is // treated as an `OUTPUT_ONLY` field and reflects the current number of nodes // allocated to the instance. This might be zero in API responses for instances - // that are not yet in the `READY` state. For more information, see Compute - // capacity, nodes, and processing units - // (https://cloud.google.com/spanner/docs/compute-capacity). + // that are not yet in the `READY` state. If the instance has varying node + // count across replicas (achieved by setting asymmetric_autoscaling_options in + // autoscaling config), the node_count here is the maximum node count across + // all replicas. For more information, see Compute capacity, nodes, and + // processing units (https://cloud.google.com/spanner/docs/compute-capacity). NodeCount int64 `json:"nodeCount,omitempty"` // ProcessingUnits: The number of processing units allocated to this instance. // At most, one of either `processing_units` or `node_count` should be present @@ -2794,9 +2865,17 @@ type Instance struct { // is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and // reflects the current number of processing units allocated to the instance. // This might be zero in API responses for instances that are not yet in the - // `READY` state. For more information, see Compute capacity, nodes and - // processing units (https://cloud.google.com/spanner/docs/compute-capacity). + // `READY` state. If the instance has varying processing units per replica + // (achieved by setting asymmetric_autoscaling_options in autoscaling config), + // the processing_units here is the maximum processing units across all + // replicas. For more information, see Compute capacity, nodes and processing + // units (https://cloud.google.com/spanner/docs/compute-capacity). ProcessingUnits int64 `json:"processingUnits,omitempty"` + // ReplicaComputeCapacity: Output only. Lists the compute capacity per + // ReplicaSelection. A replica selection identifies a set of replicas with + // common properties. Replicas identified by a ReplicaSelection are scaled with + // the same compute capacity. + ReplicaComputeCapacity []*ReplicaComputeCapacity `json:"replicaComputeCapacity,omitempty"` // State: Output only. The current instance state. For CreateInstance, the // state must be either omitted or set to `CREATING`. For UpdateInstance, the // state must be either omitted or set to `READY`. @@ -3078,6 +3157,30 @@ func (s InstancePartition) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InstanceReplicaSelection: ReplicaSelection identifies replicas with common +// properties. +type InstanceReplicaSelection struct { + // Location: Required. Name of the location of the replicas (e.g., + // "us-central1"). + Location string `json:"location,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Location") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstanceReplicaSelection) MarshalJSON() ([]byte, error) { + type NoMethod InstanceReplicaSelection + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // KeyRange: KeyRange represents a range of rows in a table or index. A range // has a start key and an end key. These keys can be open or closed, indicating // if the range includes rows with that key. Keys are represented by lists, @@ -4892,6 +4995,38 @@ func (s ReadWrite) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ReplicaComputeCapacity: ReplicaComputeCapacity describes the amount of +// server resources that are allocated to each replica identified by the +// replica selection. +type ReplicaComputeCapacity struct { + // NodeCount: The number of nodes allocated to each replica. This may be zero + // in API responses for instances that are not yet in state `READY`. + NodeCount int64 `json:"nodeCount,omitempty"` + // ProcessingUnits: The number of processing units allocated to each replica. + // This may be zero in API responses for instances that are not yet in state + // `READY`. + ProcessingUnits int64 `json:"processingUnits,omitempty"` + // ReplicaSelection: Required. Identifies replicas by specified properties. All + // replicas in the selection have the same amount of compute capacity. + ReplicaSelection *InstanceReplicaSelection `json:"replicaSelection,omitempty"` + // ForceSendFields is a list of field names (e.g. "NodeCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NodeCount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReplicaComputeCapacity) MarshalJSON() ([]byte, error) { + type NoMethod ReplicaComputeCapacity + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ReplicaInfo struct { // DefaultLeaderLocation: If true, this location is designated as the default // leader location where leader replicas are placed. See the region types @@ -6016,6 +6151,10 @@ type Type struct { // "PROTO" - Encoded as a base64-encoded `string`, as described in RFC 4648, // section 4. // "ENUM" - Encoded as `string`, in decimal format. + // "INTERVAL" - Encoded as `string`, in `ISO8601` duration format - + // `P[n]Y[n]M[n]DT[n]H[n]M[n[.fraction]]S` where `n` is an integer. For + // example, `P1Y2M3DT4H5M6.5S` represents time duration of 1 year, 2 months, 3 + // days, 4 hours, 5 minutes, and 6.5 seconds. Code string `json:"code,omitempty"` // ProtoTypeFqn: If code == PROTO or code == ENUM, then `proto_type_fqn` is the // fully qualified name of the proto type representing the proto/enum diff --git a/texttospeech/v1/texttospeech-api.json b/texttospeech/v1/texttospeech-api.json index 0669aba88f6..6f9f38e5fad 100644 --- a/texttospeech/v1/texttospeech-api.json +++ b/texttospeech/v1/texttospeech-api.json @@ -294,24 +294,6 @@ }, "voices": { "methods": { - "generateVoiceCloningKey": { - "description": "Generates voice clone key given a short voice prompt. This method validates the voice prompts with a series of checks against the voice talent statement to verify the voice clone is safe to generate.", - "flatPath": "v1/voices:generateVoiceCloningKey", - "httpMethod": "POST", - "id": "texttospeech.voices.generateVoiceCloningKey", - "parameterOrder": [], - "parameters": {}, - "path": "v1/voices:generateVoiceCloningKey", - "request": { - "$ref": "GenerateVoiceCloningKeyRequest" - }, - "response": { - "$ref": "GenerateVoiceCloningKeyResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "list": { "description": "Returns a list of Voice supported for synthesis.", "flatPath": "v1/voices", @@ -336,7 +318,7 @@ } } }, - "revision": "20241001", + "revision": "20241008", "rootUrl": "https://texttospeech.googleapis.com/", "schemas": { "AdvancedVoiceOptions": { @@ -485,40 +467,6 @@ "properties": {}, "type": "object" }, - "GenerateVoiceCloningKeyRequest": { - "description": "Request message for the `GenerateVoiceCloningKey` method.", - "id": "GenerateVoiceCloningKeyRequest", - "properties": { - "consentScript": { - "description": "Required. The script used for the voice talent statement. The script will be provided to the caller through other channels. It must be returned unchanged in this field.", - "type": "string" - }, - "languageCode": { - "description": "Required. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\". See [Language Support](https://cloud.google.com/speech-to-text/docs/languages) for a list of the currently supported language codes.", - "type": "string" - }, - "referenceAudio": { - "$ref": "InputAudio", - "description": "Required. The training audio used to create voice clone. This is currently limited to LINEAR16 PCM WAV files mono audio with 24khz sample rate. This needs to be specified in [InputAudio.audio_config], other values will be explicitly rejected." - }, - "voiceTalentConsent": { - "$ref": "InputAudio", - "description": "Required. The voice talent audio used to verify consent to voice clone." - } - }, - "type": "object" - }, - "GenerateVoiceCloningKeyResponse": { - "description": "Response message for the `GenerateVoiceCloningKey` method.", - "id": "GenerateVoiceCloningKeyResponse", - "properties": { - "voiceCloningKey": { - "description": "The voice clone key. Use it in the SynthesizeSpeechRequest by setting [voice.voice_clone.voice_cloning_key].", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata": { "description": "Metadata for response returned by the `SynthesizeLongAudio` method.", "id": "GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata", @@ -542,54 +490,6 @@ }, "type": "object" }, - "InputAudio": { - "description": "Holds audio content and config.", - "id": "InputAudio", - "properties": { - "audioConfig": { - "$ref": "InputAudioConfig", - "description": "Required. Provides information that specifies how to process content." - }, - "content": { - "description": "Required. The audio data bytes encoded as specified in `InputAudioConfig`. Note: as with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64. Audio samples should be between 5-25 seconds in length.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, - "InputAudioConfig": { - "description": "Description of inputted audio data.", - "id": "InputAudioConfig", - "properties": { - "audioEncoding": { - "description": "Required. The format of the audio byte stream.", - "enum": [ - "AUDIO_ENCODING_UNSPECIFIED", - "LINEAR16", - "MP3", - "OGG_OPUS", - "MULAW", - "ALAW" - ], - "enumDescriptions": [ - "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", - "Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.", - "MP3 audio at 32kbps.", - "Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.", - "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header.", - "8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. Audio content returned as ALAW also contains a WAV header." - ], - "type": "string" - }, - "sampleRateHertz": { - "description": "Required. The sample rate (in hertz) for this audio.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "ListOperationsResponse", @@ -823,17 +723,6 @@ }, "type": "object" }, - "VoiceCloneParams": { - "description": "The configuration of Voice Clone feature.", - "id": "VoiceCloneParams", - "properties": { - "voiceCloningKey": { - "description": "Required. Created by GenerateVoiceCloningKey.", - "type": "string" - } - }, - "type": "object" - }, "VoiceSelectionParams": { "description": "Description of which voice to use for a synthesis request.", "id": "VoiceSelectionParams", @@ -865,10 +754,6 @@ "A gender-neutral voice. This voice is not yet supported." ], "type": "string" - }, - "voiceClone": { - "$ref": "VoiceCloneParams", - "description": "Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration." } }, "type": "object" diff --git a/texttospeech/v1/texttospeech-gen.go b/texttospeech/v1/texttospeech-gen.go index d6740d4b7e5..8bb59a93731 100644 --- a/texttospeech/v1/texttospeech-gen.go +++ b/texttospeech/v1/texttospeech-gen.go @@ -441,72 +441,6 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } -// GenerateVoiceCloningKeyRequest: Request message for the -// `GenerateVoiceCloningKey` method. -type GenerateVoiceCloningKeyRequest struct { - // ConsentScript: Required. The script used for the voice talent statement. The - // script will be provided to the caller through other channels. It must be - // returned unchanged in this field. - ConsentScript string `json:"consentScript,omitempty"` - // LanguageCode: Required. The language of the supplied audio as a BCP-47 - // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: - // "en-US". See Language Support - // (https://cloud.google.com/speech-to-text/docs/languages) for a list of the - // currently supported language codes. - LanguageCode string `json:"languageCode,omitempty"` - // ReferenceAudio: Required. The training audio used to create voice clone. - // This is currently limited to LINEAR16 PCM WAV files mono audio with 24khz - // sample rate. This needs to be specified in [InputAudio.audio_config], other - // values will be explicitly rejected. - ReferenceAudio *InputAudio `json:"referenceAudio,omitempty"` - // VoiceTalentConsent: Required. The voice talent audio used to verify consent - // to voice clone. - VoiceTalentConsent *InputAudio `json:"voiceTalentConsent,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsentScript") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsentScript") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GenerateVoiceCloningKeyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GenerateVoiceCloningKeyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GenerateVoiceCloningKeyResponse: Response message for the -// `GenerateVoiceCloningKey` method. -type GenerateVoiceCloningKeyResponse struct { - // VoiceCloningKey: The voice clone key. Use it in the SynthesizeSpeechRequest - // by setting [voice.voice_clone.voice_cloning_key]. - VoiceCloningKey string `json:"voiceCloningKey,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "VoiceCloningKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VoiceCloningKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GenerateVoiceCloningKeyResponse) MarshalJSON() ([]byte, error) { - type NoMethod GenerateVoiceCloningKeyResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata: Metadata for response // returned by the `SynthesizeLongAudio` method. type GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata struct { @@ -549,73 +483,6 @@ func (s *GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata) UnmarshalJSON(dat return nil } -// InputAudio: Holds audio content and config. -type InputAudio struct { - // AudioConfig: Required. Provides information that specifies how to process - // content. - AudioConfig *InputAudioConfig `json:"audioConfig,omitempty"` - // Content: Required. The audio data bytes encoded as specified in - // `InputAudioConfig`. Note: as with all bytes fields, proto buffers use a pure - // binary representation, whereas JSON representations use base64. Audio - // samples should be between 5-25 seconds in length. - Content string `json:"content,omitempty"` - // ForceSendFields is a list of field names (e.g. "AudioConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AudioConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InputAudio) MarshalJSON() ([]byte, error) { - type NoMethod InputAudio - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InputAudioConfig: Description of inputted audio data. -type InputAudioConfig struct { - // AudioEncoding: Required. The format of the audio byte stream. - // - // Possible values: - // "AUDIO_ENCODING_UNSPECIFIED" - Not specified. Will return result - // google.rpc.Code.INVALID_ARGUMENT. - // "LINEAR16" - Uncompressed 16-bit signed little-endian samples (Linear - // PCM). Audio content returned as LINEAR16 also contains a WAV header. - // "MP3" - MP3 audio at 32kbps. - // "OGG_OPUS" - Opus encoded audio wrapped in an ogg container. The result - // will be a file which can be played natively on Android, and in browsers (at - // least Chrome and Firefox). The quality of the encoding is considerably - // higher than MP3 while using approximately the same bitrate. - // "MULAW" - 8-bit samples that compand 14-bit audio samples using G.711 - // PCMU/mu-law. Audio content returned as MULAW also contains a WAV header. - // "ALAW" - 8-bit samples that compand 14-bit audio samples using G.711 - // PCMU/A-law. Audio content returned as ALAW also contains a WAV header. - AudioEncoding string `json:"audioEncoding,omitempty"` - // SampleRateHertz: Required. The sample rate (in hertz) for this audio. - SampleRateHertz int64 `json:"sampleRateHertz,omitempty"` - // ForceSendFields is a list of field names (e.g. "AudioEncoding") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AudioEncoding") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InputAudioConfig) MarshalJSON() ([]byte, error) { - type NoMethod InputAudioConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ListOperationsResponse: The response message for Operations.ListOperations. type ListOperationsResponse struct { // NextPageToken: The standard List next-page token. @@ -963,28 +830,6 @@ func (s Voice) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// VoiceCloneParams: The configuration of Voice Clone feature. -type VoiceCloneParams struct { - // VoiceCloningKey: Required. Created by GenerateVoiceCloningKey. - VoiceCloningKey string `json:"voiceCloningKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "VoiceCloningKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VoiceCloningKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VoiceCloneParams) MarshalJSON() ([]byte, error) { - type NoMethod VoiceCloneParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // VoiceSelectionParams: Description of which voice to use for a synthesis // request. type VoiceSelectionParams struct { @@ -1024,10 +869,6 @@ type VoiceSelectionParams struct { // "FEMALE" - A female voice. // "NEUTRAL" - A gender-neutral voice. This voice is not yet supported. SsmlGender string `json:"ssmlGender,omitempty"` - // VoiceClone: Optional. The configuration for a voice clone. If - // [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice - // clone matching the specified configuration. - VoiceClone *VoiceCloneParams `json:"voiceClone,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomVoice") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1710,104 +1551,6 @@ func (c *TextSynthesizeCall) Do(opts ...googleapi.CallOption) (*SynthesizeSpeech return ret, nil } -type VoicesGenerateVoiceCloningKeyCall struct { - s *Service - generatevoicecloningkeyrequest *GenerateVoiceCloningKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GenerateVoiceCloningKey: Generates voice clone key given a short voice -// prompt. This method validates the voice prompts with a series of checks -// against the voice talent statement to verify the voice clone is safe to -// generate. -func (r *VoicesService) GenerateVoiceCloningKey(generatevoicecloningkeyrequest *GenerateVoiceCloningKeyRequest) *VoicesGenerateVoiceCloningKeyCall { - c := &VoicesGenerateVoiceCloningKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.generatevoicecloningkeyrequest = generatevoicecloningkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VoicesGenerateVoiceCloningKeyCall) Fields(s ...googleapi.Field) *VoicesGenerateVoiceCloningKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VoicesGenerateVoiceCloningKeyCall) Context(ctx context.Context) *VoicesGenerateVoiceCloningKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VoicesGenerateVoiceCloningKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VoicesGenerateVoiceCloningKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatevoicecloningkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/voices:generateVoiceCloningKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "texttospeech.voices.generateVoiceCloningKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *GenerateVoiceCloningKeyResponse.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 *VoicesGenerateVoiceCloningKeyCall) Do(opts ...googleapi.CallOption) (*GenerateVoiceCloningKeyResponse, 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 := &GenerateVoiceCloningKeyResponse{ - 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 -} - type VoicesListCall struct { s *Service urlParams_ gensupport.URLParams diff --git a/texttospeech/v1beta1/texttospeech-api.json b/texttospeech/v1beta1/texttospeech-api.json index a44438f330c..5b14029b01b 100644 --- a/texttospeech/v1beta1/texttospeech-api.json +++ b/texttospeech/v1beta1/texttospeech-api.json @@ -237,24 +237,6 @@ }, "voices": { "methods": { - "generateVoiceCloningKey": { - "description": "Generates voice clone key given a short voice prompt. This method validates the voice prompts with a series of checks against the voice talent statement to verify the voice clone is safe to generate.", - "flatPath": "v1beta1/voices:generateVoiceCloningKey", - "httpMethod": "POST", - "id": "texttospeech.voices.generateVoiceCloningKey", - "parameterOrder": [], - "parameters": {}, - "path": "v1beta1/voices:generateVoiceCloningKey", - "request": { - "$ref": "GenerateVoiceCloningKeyRequest" - }, - "response": { - "$ref": "GenerateVoiceCloningKeyResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "list": { "description": "Returns a list of Voice supported for synthesis.", "flatPath": "v1beta1/voices", @@ -279,7 +261,7 @@ } } }, - "revision": "20241001", + "revision": "20241008", "rootUrl": "https://texttospeech.googleapis.com/", "schemas": { "AdvancedVoiceOptions": { @@ -418,40 +400,6 @@ }, "type": "object" }, - "GenerateVoiceCloningKeyRequest": { - "description": "Request message for the `GenerateVoiceCloningKey` method.", - "id": "GenerateVoiceCloningKeyRequest", - "properties": { - "consentScript": { - "description": "Required. The script used for the voice talent statement. The script will be provided to the caller through other channels. It must be returned unchanged in this field.", - "type": "string" - }, - "languageCode": { - "description": "Required. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\". See [Language Support](https://cloud.google.com/speech-to-text/docs/languages) for a list of the currently supported language codes.", - "type": "string" - }, - "referenceAudio": { - "$ref": "InputAudio", - "description": "Required. The training audio used to create voice clone. This is currently limited to LINEAR16 PCM WAV files mono audio with 24khz sample rate. This needs to be specified in [InputAudio.audio_config], other values will be explicitly rejected." - }, - "voiceTalentConsent": { - "$ref": "InputAudio", - "description": "Required. The voice talent audio used to verify consent to voice clone." - } - }, - "type": "object" - }, - "GenerateVoiceCloningKeyResponse": { - "description": "Response message for the `GenerateVoiceCloningKey` method.", - "id": "GenerateVoiceCloningKeyResponse", - "properties": { - "voiceCloningKey": { - "description": "The voice clone key. Use it in the SynthesizeSpeechRequest by setting [voice.voice_clone.voice_cloning_key].", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata": { "description": "Metadata for response returned by the `SynthesizeLongAudio` method.", "id": "GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata", @@ -475,56 +423,6 @@ }, "type": "object" }, - "InputAudio": { - "description": "Holds audio content and config.", - "id": "InputAudio", - "properties": { - "audioConfig": { - "$ref": "InputAudioConfig", - "description": "Required. Provides information that specifies how to process content." - }, - "content": { - "description": "Required. The audio data bytes encoded as specified in `InputAudioConfig`. Note: as with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64. Audio samples should be between 5-25 seconds in length.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, - "InputAudioConfig": { - "description": "Description of inputted audio data.", - "id": "InputAudioConfig", - "properties": { - "audioEncoding": { - "description": "Required. The format of the audio byte stream.", - "enum": [ - "AUDIO_ENCODING_UNSPECIFIED", - "LINEAR16", - "MP3", - "MP3_64_KBPS", - "OGG_OPUS", - "MULAW", - "ALAW" - ], - "enumDescriptions": [ - "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", - "Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.", - "MP3 audio at 32kbps.", - "MP3 at 64kbps.", - "Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.", - "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header.", - "8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. Audio content returned as ALAW also contains a WAV header." - ], - "type": "string" - }, - "sampleRateHertz": { - "description": "Required. The sample rate (in hertz) for this audio.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "ListOperationsResponse", @@ -800,17 +698,6 @@ }, "type": "object" }, - "VoiceCloneParams": { - "description": "The configuration of Voice Clone feature.", - "id": "VoiceCloneParams", - "properties": { - "voiceCloningKey": { - "description": "Required. Created by GenerateVoiceCloningKey.", - "type": "string" - } - }, - "type": "object" - }, "VoiceSelectionParams": { "description": "Description of which voice to use for a synthesis request.", "id": "VoiceSelectionParams", @@ -842,10 +729,6 @@ "A gender-neutral voice. This voice is not yet supported." ], "type": "string" - }, - "voiceClone": { - "$ref": "VoiceCloneParams", - "description": "Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration." } }, "type": "object" diff --git a/texttospeech/v1beta1/texttospeech-gen.go b/texttospeech/v1beta1/texttospeech-gen.go index bee5adca955..4dd0ed4978b 100644 --- a/texttospeech/v1beta1/texttospeech-gen.go +++ b/texttospeech/v1beta1/texttospeech-gen.go @@ -417,72 +417,6 @@ func (s CustomVoiceParams) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GenerateVoiceCloningKeyRequest: Request message for the -// `GenerateVoiceCloningKey` method. -type GenerateVoiceCloningKeyRequest struct { - // ConsentScript: Required. The script used for the voice talent statement. The - // script will be provided to the caller through other channels. It must be - // returned unchanged in this field. - ConsentScript string `json:"consentScript,omitempty"` - // LanguageCode: Required. The language of the supplied audio as a BCP-47 - // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: - // "en-US". See Language Support - // (https://cloud.google.com/speech-to-text/docs/languages) for a list of the - // currently supported language codes. - LanguageCode string `json:"languageCode,omitempty"` - // ReferenceAudio: Required. The training audio used to create voice clone. - // This is currently limited to LINEAR16 PCM WAV files mono audio with 24khz - // sample rate. This needs to be specified in [InputAudio.audio_config], other - // values will be explicitly rejected. - ReferenceAudio *InputAudio `json:"referenceAudio,omitempty"` - // VoiceTalentConsent: Required. The voice talent audio used to verify consent - // to voice clone. - VoiceTalentConsent *InputAudio `json:"voiceTalentConsent,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsentScript") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsentScript") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GenerateVoiceCloningKeyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GenerateVoiceCloningKeyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GenerateVoiceCloningKeyResponse: Response message for the -// `GenerateVoiceCloningKey` method. -type GenerateVoiceCloningKeyResponse struct { - // VoiceCloningKey: The voice clone key. Use it in the SynthesizeSpeechRequest - // by setting [voice.voice_clone.voice_cloning_key]. - VoiceCloningKey string `json:"voiceCloningKey,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "VoiceCloningKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VoiceCloningKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GenerateVoiceCloningKeyResponse) MarshalJSON() ([]byte, error) { - type NoMethod GenerateVoiceCloningKeyResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata: Metadata for // response returned by the `SynthesizeLongAudio` method. type GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata struct { @@ -525,74 +459,6 @@ func (s *GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata) UnmarshalJSO return nil } -// InputAudio: Holds audio content and config. -type InputAudio struct { - // AudioConfig: Required. Provides information that specifies how to process - // content. - AudioConfig *InputAudioConfig `json:"audioConfig,omitempty"` - // Content: Required. The audio data bytes encoded as specified in - // `InputAudioConfig`. Note: as with all bytes fields, proto buffers use a pure - // binary representation, whereas JSON representations use base64. Audio - // samples should be between 5-25 seconds in length. - Content string `json:"content,omitempty"` - // ForceSendFields is a list of field names (e.g. "AudioConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AudioConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InputAudio) MarshalJSON() ([]byte, error) { - type NoMethod InputAudio - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InputAudioConfig: Description of inputted audio data. -type InputAudioConfig struct { - // AudioEncoding: Required. The format of the audio byte stream. - // - // Possible values: - // "AUDIO_ENCODING_UNSPECIFIED" - Not specified. Will return result - // google.rpc.Code.INVALID_ARGUMENT. - // "LINEAR16" - Uncompressed 16-bit signed little-endian samples (Linear - // PCM). Audio content returned as LINEAR16 also contains a WAV header. - // "MP3" - MP3 audio at 32kbps. - // "MP3_64_KBPS" - MP3 at 64kbps. - // "OGG_OPUS" - Opus encoded audio wrapped in an ogg container. The result - // will be a file which can be played natively on Android, and in browsers (at - // least Chrome and Firefox). The quality of the encoding is considerably - // higher than MP3 while using approximately the same bitrate. - // "MULAW" - 8-bit samples that compand 14-bit audio samples using G.711 - // PCMU/mu-law. Audio content returned as MULAW also contains a WAV header. - // "ALAW" - 8-bit samples that compand 14-bit audio samples using G.711 - // PCMU/A-law. Audio content returned as ALAW also contains a WAV header. - AudioEncoding string `json:"audioEncoding,omitempty"` - // SampleRateHertz: Required. The sample rate (in hertz) for this audio. - SampleRateHertz int64 `json:"sampleRateHertz,omitempty"` - // ForceSendFields is a list of field names (e.g. "AudioEncoding") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AudioEncoding") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InputAudioConfig) MarshalJSON() ([]byte, error) { - type NoMethod InputAudioConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ListOperationsResponse: The response message for Operations.ListOperations. type ListOperationsResponse struct { // NextPageToken: The standard List next-page token. @@ -994,28 +860,6 @@ func (s Voice) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// VoiceCloneParams: The configuration of Voice Clone feature. -type VoiceCloneParams struct { - // VoiceCloningKey: Required. Created by GenerateVoiceCloningKey. - VoiceCloningKey string `json:"voiceCloningKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "VoiceCloningKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VoiceCloningKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VoiceCloneParams) MarshalJSON() ([]byte, error) { - type NoMethod VoiceCloneParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // VoiceSelectionParams: Description of which voice to use for a synthesis // request. type VoiceSelectionParams struct { @@ -1055,10 +899,6 @@ type VoiceSelectionParams struct { // "FEMALE" - A female voice. // "NEUTRAL" - A gender-neutral voice. This voice is not yet supported. SsmlGender string `json:"ssmlGender,omitempty"` - // VoiceClone: Optional. The configuration for a voice clone. If - // [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice - // clone matching the specified configuration. - VoiceClone *VoiceCloneParams `json:"voiceClone,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomVoice") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1534,104 +1374,6 @@ func (c *TextSynthesizeCall) Do(opts ...googleapi.CallOption) (*SynthesizeSpeech return ret, nil } -type VoicesGenerateVoiceCloningKeyCall struct { - s *Service - generatevoicecloningkeyrequest *GenerateVoiceCloningKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GenerateVoiceCloningKey: Generates voice clone key given a short voice -// prompt. This method validates the voice prompts with a series of checks -// against the voice talent statement to verify the voice clone is safe to -// generate. -func (r *VoicesService) GenerateVoiceCloningKey(generatevoicecloningkeyrequest *GenerateVoiceCloningKeyRequest) *VoicesGenerateVoiceCloningKeyCall { - c := &VoicesGenerateVoiceCloningKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.generatevoicecloningkeyrequest = generatevoicecloningkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VoicesGenerateVoiceCloningKeyCall) Fields(s ...googleapi.Field) *VoicesGenerateVoiceCloningKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VoicesGenerateVoiceCloningKeyCall) Context(ctx context.Context) *VoicesGenerateVoiceCloningKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VoicesGenerateVoiceCloningKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VoicesGenerateVoiceCloningKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatevoicecloningkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/voices:generateVoiceCloningKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "texttospeech.voices.generateVoiceCloningKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *GenerateVoiceCloningKeyResponse.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 *VoicesGenerateVoiceCloningKeyCall) Do(opts ...googleapi.CallOption) (*GenerateVoiceCloningKeyResponse, 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 := &GenerateVoiceCloningKeyResponse{ - 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 -} - type VoicesListCall struct { s *Service urlParams_ gensupport.URLParams