diff --git a/CHANGES.md b/CHANGES.md index cabec3658c..758a8a65a7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,22 @@ # Changes +## [0.245.0](https://github.com/googleapis/google-api-go-client/compare/v0.244.0...v0.245.0) (2025-08-05) + + +### Features + +* **all:** Auto-regenerate discovery clients ([#3252](https://github.com/googleapis/google-api-go-client/issues/3252)) ([0716728](https://github.com/googleapis/google-api-go-client/commit/07167280e3c760ca963632dc541e9c1428c639b9)) +* **all:** Auto-regenerate discovery clients ([#3254](https://github.com/googleapis/google-api-go-client/issues/3254)) ([702998a](https://github.com/googleapis/google-api-go-client/commit/702998a9a8285e1093886fc1b0fdfbcc8112fd6f)) +* **all:** Auto-regenerate discovery clients ([#3255](https://github.com/googleapis/google-api-go-client/issues/3255)) ([0f10366](https://github.com/googleapis/google-api-go-client/commit/0f103667e9560e28646edc7aa03e47e71983aae5)) +* **all:** Auto-regenerate discovery clients ([#3256](https://github.com/googleapis/google-api-go-client/issues/3256)) ([83176a9](https://github.com/googleapis/google-api-go-client/commit/83176a94b64c04b46b4926f41f5f87d7a54f71f6)) +* **all:** Auto-regenerate discovery clients ([#3257](https://github.com/googleapis/google-api-go-client/issues/3257)) ([efc3371](https://github.com/googleapis/google-api-go-client/commit/efc337167473eb103dbd70f9b5f9491ec1cff75c)) +* **all:** Auto-regenerate discovery clients ([#3259](https://github.com/googleapis/google-api-go-client/issues/3259)) ([bf38d3a](https://github.com/googleapis/google-api-go-client/commit/bf38d3ad99d570f956658f9f63209a5143f94703)) + + +### Bug Fixes + +* **gensupport:** Fix transferChunk race condition by returning response with non-cancelled context. ([#3258](https://github.com/googleapis/google-api-go-client/issues/3258)) ([091d422](https://github.com/googleapis/google-api-go-client/commit/091d42217a08f1a5873cc13cfb51d4275b18e2e6)) + ## [0.244.0](https://github.com/googleapis/google-api-go-client/compare/v0.243.0...v0.244.0) (2025-07-30) diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index cb995136ac..3c26750ce8 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -6118,6 +6118,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "directWrite": { + "description": "Bidirectional streaming RPC to directly write to feature values in a feature view. Requests may not have a one-to-one mapping to responses and responses may be returned out-of-order to reduce latency.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/featureOnlineStores/{featureOnlineStoresId}/featureViews/{featureViewsId}:directWrite", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.featureOnlineStores.featureViews.directWrite", + "parameterOrder": [ + "featureView" + ], + "parameters": { + "featureView": { + "description": "FeatureView resource format `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+featureView}:directWrite", + "request": { + "$ref": "GoogleCloudAiplatformV1FeatureViewDirectWriteRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1FeatureViewDirectWriteResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "fetchFeatureValues": { "description": "Fetch feature values under a FeatureView.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/featureOnlineStores/{featureOnlineStoresId}/featureViews/{featureViewsId}:fetchFeatureValues", @@ -20258,7 +20286,7 @@ } } }, - "revision": "20250715", + "revision": "20250731", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -21308,7 +21336,7 @@ "id": "GoogleCloudAiplatformV1AutoscalingMetricSpec", "properties": { "metricName": { - "description": "Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization`", + "description": "Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization` * `aiplatform.googleapis.com/prediction/online/request_count`", "type": "string" }, "target": { @@ -23193,6 +23221,33 @@ "description": "Runtime operation information for EndpointService.CreateEndpoint.", "id": "GoogleCloudAiplatformV1CreateEndpointOperationMetadata", "properties": { + "deploymentStage": { + "description": "Output only. The deployment stage of the model. Only populated if this CreateEndpoint request deploys a model at the same time.", + "enum": [ + "DEPLOYMENT_STAGE_UNSPECIFIED", + "STARTING_DEPLOYMENT", + "PREPARING_MODEL", + "CREATING_SERVING_CLUSTER", + "ADDING_NODES_TO_CLUSTER", + "GETTING_CONTAINER_IMAGE", + "STARTING_MODEL_SERVER", + "FINISHING_UP", + "DEPLOYMENT_TERMINATED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The deployment is initializing and setting up the environment.", + "The deployment is preparing the model assets.", + "The deployment is creating the underlying serving cluster.", + "The deployment is adding nodes to the serving cluster.", + "The deployment is getting the container image for the model server.", + "The deployment is starting the model server.", + "The deployment is performing finalization steps.", + "The deployment has terminated." + ], + "readOnly": true, + "type": "string" + }, "genericMetadata": { "$ref": "GoogleCloudAiplatformV1GenericOperationMetadata", "description": "The operation generic information." @@ -24259,6 +24314,33 @@ "description": "Runtime operation information for EndpointService.DeployModel.", "id": "GoogleCloudAiplatformV1DeployModelOperationMetadata", "properties": { + "deploymentStage": { + "description": "Output only. The deployment stage of the model.", + "enum": [ + "DEPLOYMENT_STAGE_UNSPECIFIED", + "STARTING_DEPLOYMENT", + "PREPARING_MODEL", + "CREATING_SERVING_CLUSTER", + "ADDING_NODES_TO_CLUSTER", + "GETTING_CONTAINER_IMAGE", + "STARTING_MODEL_SERVER", + "FINISHING_UP", + "DEPLOYMENT_TERMINATED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The deployment is initializing and setting up the environment.", + "The deployment is preparing the model assets.", + "The deployment is creating the underlying serving cluster.", + "The deployment is adding nodes to the serving cluster.", + "The deployment is getting the container image for the model server.", + "The deployment is starting the model server.", + "The deployment is performing finalization steps.", + "The deployment has terminated." + ], + "readOnly": true, + "type": "string" + }, "genericMetadata": { "$ref": "GoogleCloudAiplatformV1GenericOperationMetadata", "description": "The operation generic information." @@ -24471,6 +24553,18 @@ "description": "Optional. The deployment group can be no longer than 64 characters (eg: 'test', 'prod'). If not set, we will use the 'default' deployment group. Creating `deployment_groups` with `reserved_ip_ranges` is a recommended practice when the peered network has multiple peering ranges. This creates your deployments from predictable IP spaces for easier traffic administration. Also, one deployment_group (except 'default') can only be used with the same reserved_ip_ranges which means if the deployment_group has been used with reserved_ip_ranges: [a, b, c], using it with [a, b] or [d, e] is disallowed. Note: we only support up to 5 deployment groups(not including 'default').", "type": "string" }, + "deploymentTier": { + "description": "Optional. The deployment tier that the index is deployed to. DEPLOYMENT_TIER_UNSPECIFIED defaults to PERFORMANCE.", + "enum": [ + "DEPLOYMENT_TIER_UNSPECIFIED", + "STORAGE" + ], + "enumDescriptions": [ + "Default deployment tier.", + "Optimized for costs." + ], + "type": "string" + }, "displayName": { "description": "The display name of the DeployedIndex. If not provided upon creation, the Index's display_name is used.", "type": "string" @@ -25040,7 +25134,15 @@ "GoogleCloudAiplatformV1EnterpriseWebSearch": { "description": "Tool to search public web data, powered by Vertex AI Search and Sec4 compliance.", "id": "GoogleCloudAiplatformV1EnterpriseWebSearch", - "properties": {}, + "properties": { + "excludeDomains": { + "description": "Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, "GoogleCloudAiplatformV1EntityIdSelector": { @@ -27422,6 +27524,87 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1FeatureViewDirectWriteRequest": { + "description": "Request message for FeatureOnlineStoreService.FeatureViewDirectWrite.", + "id": "GoogleCloudAiplatformV1FeatureViewDirectWriteRequest", + "properties": { + "dataKeyAndFeatureValues": { + "description": "Required. The data keys and associated feature values.", + "items": { + "$ref": "GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValues" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValues": { + "description": "A data key and associated feature values to write to the feature view.", + "id": "GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValues", + "properties": { + "dataKey": { + "$ref": "GoogleCloudAiplatformV1FeatureViewDataKey", + "description": "The data key." + }, + "features": { + "description": "List of features to write.", + "items": { + "$ref": "GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeature" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeature": { + "description": "Feature name \u0026 value pair.", + "id": "GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeature", + "properties": { + "name": { + "description": "Feature short name.", + "type": "string" + }, + "value": { + "$ref": "GoogleCloudAiplatformV1FeatureValue", + "description": "Feature value. A user provided timestamp may be set in the `FeatureValue.metadata.generate_time` field." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FeatureViewDirectWriteResponse": { + "description": "Response message for FeatureOnlineStoreService.FeatureViewDirectWrite.", + "id": "GoogleCloudAiplatformV1FeatureViewDirectWriteResponse", + "properties": { + "status": { + "$ref": "GoogleRpcStatus", + "description": "Response status for the keys listed in FeatureViewDirectWriteResponse.write_responses. The error only applies to the listed data keys - the stream will remain open for further FeatureOnlineStoreService.FeatureViewDirectWriteRequest requests. Partial failures (e.g. if the first 10 keys of a request fail, but the rest succeed) from a single request may result in multiple responses - there will be one response for the successful request keys and one response for the failing request keys." + }, + "writeResponses": { + "description": "Details about write for each key. If status is not OK, WriteResponse.data_key will have the key with error, but WriteResponse.online_store_write_time will not be present.", + "items": { + "$ref": "GoogleCloudAiplatformV1FeatureViewDirectWriteResponseWriteResponse" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FeatureViewDirectWriteResponseWriteResponse": { + "description": "Details about the write for each key.", + "id": "GoogleCloudAiplatformV1FeatureViewDirectWriteResponseWriteResponse", + "properties": { + "dataKey": { + "$ref": "GoogleCloudAiplatformV1FeatureViewDataKey", + "description": "What key is this write response associated with." + }, + "onlineStoreWriteTime": { + "description": "When the feature values were written to the online store. If FeatureViewDirectWriteResponse.status is not OK, this field is not populated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource": { "description": "A Feature Registry source for features that need to be synced to Online Store.", "id": "GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource", @@ -28968,6 +29151,22 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1GoogleMaps": { + "description": "Tool to retrieve public maps data for grounding, powered by Google.", + "id": "GoogleCloudAiplatformV1GoogleMaps", + "properties": { + "apiAuth": { + "$ref": "GoogleCloudAiplatformV1ApiAuth", + "deprecated": true, + "description": "The authentication config to access the API. Deprecated. Please use auth_config instead." + }, + "authConfig": { + "$ref": "GoogleCloudAiplatformV1AuthConfig", + "description": "The authentication config to access the API. Only API key is supported." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1GoogleSearchRetrieval": { "description": "Tool to retrieve public web data for grounding, powered by Google.", "id": "GoogleCloudAiplatformV1GoogleSearchRetrieval", @@ -29049,6 +29248,10 @@ "description": "Grounding chunk.", "id": "GoogleCloudAiplatformV1GroundingChunk", "properties": { + "maps": { + "$ref": "GoogleCloudAiplatformV1GroundingChunkMaps", + "description": "Grounding chunk from Google Maps." + }, "retrievedContext": { "$ref": "GoogleCloudAiplatformV1GroundingChunkRetrievedContext", "description": "Grounding chunk from context retrieved by the retrieval tools." @@ -29060,6 +29263,97 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1GroundingChunkMaps": { + "description": "Chunk from Google Maps.", + "id": "GoogleCloudAiplatformV1GroundingChunkMaps", + "properties": { + "placeAnswerSources": { + "$ref": "GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSources", + "description": "Sources used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as uris to flag content." + }, + "placeId": { + "description": "This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place.", + "type": "string" + }, + "text": { + "description": "Text of the chunk.", + "type": "string" + }, + "title": { + "description": "Title of the chunk.", + "type": "string" + }, + "uri": { + "description": "URI reference of the chunk.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSources": { + "description": "Sources used to generate the place answer.", + "id": "GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSources", + "properties": { + "flagContentUri": { + "description": "A link where users can flag a problem with the generated answer.", + "type": "string" + }, + "reviewSnippets": { + "description": "Snippets of reviews that are used to generate the answer.", + "items": { + "$ref": "GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution": { + "description": "Author attribution for a photo or review.", + "id": "GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution", + "properties": { + "displayName": { + "description": "Name of the author of the Photo or Review.", + "type": "string" + }, + "photoUri": { + "description": "Profile photo URI of the author of the Photo or Review.", + "type": "string" + }, + "uri": { + "description": "URI of the author of the Photo or Review.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet": { + "description": "Encapsulates a review snippet.", + "id": "GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet", + "properties": { + "authorAttribution": { + "$ref": "GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution", + "description": "This review's author." + }, + "flagContentUri": { + "description": "A link where users can flag a problem with the review.", + "type": "string" + }, + "googleMapsUri": { + "description": "A link to show the review on Google Maps.", + "type": "string" + }, + "relativePublishTimeDescription": { + "description": "A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country.", + "type": "string" + }, + "review": { + "description": "A reference representing this place review which may be used to look up this place review again.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1GroundingChunkRetrievedContext": { "description": "Chunk from context retrieved by the retrieval tools.", "id": "GoogleCloudAiplatformV1GroundingChunkRetrievedContext", @@ -29106,6 +29400,11 @@ "description": "Metadata returned to client when grounding is enabled.", "id": "GoogleCloudAiplatformV1GroundingMetadata", "properties": { + "googleMapsWidgetContextToken": { + "description": "Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding.", + "readOnly": true, + "type": "string" + }, "groundingChunks": { "description": "List of supporting references retrieved from specified grounding source.", "items": { @@ -29695,6 +29994,14 @@ "description": "Required. Unique identifier of the datapoint.", "type": "string" }, + "embeddingMetadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. The key-value map of additional metadata for the datapoint.", + "type": "object" + }, "featureVector": { "description": "Required. Feature embedding vector for dense index. An array of numbers with the length of [NearestNeighborSearchConfig.dimensions].", "items": { @@ -31191,6 +31498,7 @@ "NVIDIA_H100_MEGA_80GB", "NVIDIA_H200_141GB", "NVIDIA_B200", + "NVIDIA_GB200", "TPU_V2", "TPU_V3", "TPU_V4_POD", @@ -31213,6 +31521,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -31229,6 +31538,7 @@ "Nvidia H100 Mega 80Gb GPU.", "Nvidia H200 141Gb GPU.", "Nvidia B200 GPU.", + "Nvidia GB200 GPU.", "TPU v2.", "TPU v3.", "TPU v4.", @@ -36197,6 +36507,10 @@ "description": "The regional resource name or the URI. Key is region, e.g., us-central1, europe-west2, global, etc..", "id": "GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences", "properties": { + "colabNotebookDisabled": { + "description": "Optional. For notebook resource. When set to true, the Colab Enterprise link will be disabled in the \"open notebook\" dialog in UI.", + "type": "boolean" + }, "references": { "additionalProperties": { "$ref": "GoogleCloudAiplatformV1PublisherModelResourceReference" @@ -37685,6 +37999,10 @@ "description": "Required. The display name of the ReasoningEngine.", "type": "string" }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1EncryptionSpec", + "description": "Customer-managed encryption key spec for a ReasoningEngine. If set, this ReasoningEngine and all sub-resources of this ReasoningEngine will be secured by this key." + }, "etag": { "description": "Optional. Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", "type": "string" @@ -37732,6 +38050,10 @@ "packageSpec": { "$ref": "GoogleCloudAiplatformV1ReasoningEngineSpecPackageSpec", "description": "Optional. User provided package spec of the ReasoningEngine. Ignored when users directly specify a deployment image through `deployment_spec.first_party_image_override`, but keeping the field_behavior to avoid introducing breaking changes." + }, + "serviceAccount": { + "description": "Optional. The service account that the Reasoning Engine artifact runs as. It should have \"roles/storage.objectViewer\" for reading the user project's Cloud Storage and \"roles/aiplatform.user\" for using Vertex extensions. If not specified, the Vertex AI Reasoning Engine Service Agent in the project will be used.", + "type": "string" } }, "type": "object" @@ -45461,21 +45783,21 @@ "$ref": "GoogleCloudAiplatformV1ToolCodeExecution", "description": "Optional. CodeExecution tool type. Enables the model to execute code as part of generation." }, - "computerUse": { - "$ref": "GoogleCloudAiplatformV1ToolComputerUse", - "description": "Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations." - }, "enterpriseWebSearch": { "$ref": "GoogleCloudAiplatformV1EnterpriseWebSearch", "description": "Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance." }, "functionDeclarations": { - "description": "Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided.", + "description": "Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.", "items": { "$ref": "GoogleCloudAiplatformV1FunctionDeclaration" }, "type": "array" }, + "googleMaps": { + "$ref": "GoogleCloudAiplatformV1GoogleMaps", + "description": "Optional. GoogleMaps tool type. Tool to support Google Maps in Model." + }, "googleSearch": { "$ref": "GoogleCloudAiplatformV1ToolGoogleSearch", "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google." @@ -45583,25 +45905,6 @@ "properties": {}, "type": "object" }, - "GoogleCloudAiplatformV1ToolComputerUse": { - "description": "Tool to support computer use.", - "id": "GoogleCloudAiplatformV1ToolComputerUse", - "properties": { - "environment": { - "description": "Required. The environment being operated.", - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "ENVIRONMENT_BROWSER" - ], - "enumDescriptions": [ - "Defaults to browser.", - "Operates in a web browser." - ], - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1ToolConfig": { "description": "Tool config. This config is shared for all tools provided in the request.", "id": "GoogleCloudAiplatformV1ToolConfig", @@ -45620,7 +45923,15 @@ "GoogleCloudAiplatformV1ToolGoogleSearch": { "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", "id": "GoogleCloudAiplatformV1ToolGoogleSearch", - "properties": {}, + "properties": { + "excludeDomains": { + "description": "Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [\"amazon.com\", \"facebook.com\"].", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, "GoogleCloudAiplatformV1ToolNameMatchInput": { @@ -47291,6 +47602,11 @@ "format": "google-duration", "type": "string" }, + "fps": { + "description": "Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0].", + "format": "double", + "type": "number" + }, "startOffset": { "description": "Optional. The start offset of the video.", "format": "google-duration", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index 3fdb3a9299..ccdcd0dc29 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -2980,7 +2980,8 @@ type GoogleCloudAiplatformV1AutoscalingMetricSpec struct { // MetricName: Required. The resource metric name. Supported metrics: * For // Online Prediction: * // `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * - // `aiplatform.googleapis.com/prediction/online/cpu/utilization` + // `aiplatform.googleapis.com/prediction/online/cpu/utilization` * + // `aiplatform.googleapis.com/prediction/online/request_count` MetricName string `json:"metricName,omitempty"` // Target: The target resource utilization in percentage (1% - 100%) for the // given metric; once the real usage deviates from the target by a certain @@ -5770,15 +5771,33 @@ func (s GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest) MarshalJSON( // GoogleCloudAiplatformV1CreateEndpointOperationMetadata: Runtime operation // information for EndpointService.CreateEndpoint. type GoogleCloudAiplatformV1CreateEndpointOperationMetadata struct { + // DeploymentStage: Output only. The deployment stage of the model. Only + // populated if this CreateEndpoint request deploys a model at the same time. + // + // Possible values: + // "DEPLOYMENT_STAGE_UNSPECIFIED" - Default value. This value is unused. + // "STARTING_DEPLOYMENT" - The deployment is initializing and setting up the + // environment. + // "PREPARING_MODEL" - The deployment is preparing the model assets. + // "CREATING_SERVING_CLUSTER" - The deployment is creating the underlying + // serving cluster. + // "ADDING_NODES_TO_CLUSTER" - The deployment is adding nodes to the serving + // cluster. + // "GETTING_CONTAINER_IMAGE" - The deployment is getting the container image + // for the model server. + // "STARTING_MODEL_SERVER" - The deployment is starting the model server. + // "FINISHING_UP" - The deployment is performing finalization steps. + // "DEPLOYMENT_TERMINATED" - The deployment has terminated. + DeploymentStage string `json:"deploymentStage,omitempty"` // GenericMetadata: The operation generic information. GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to + // ForceSendFields is a list of field names (e.g. "DeploymentStage") 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. "GenericMetadata") to include in + // NullFields is a list of field names (e.g. "DeploymentStage") 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. @@ -7319,15 +7338,32 @@ func (s GoogleCloudAiplatformV1DeployIndexResponse) MarshalJSON() ([]byte, error // GoogleCloudAiplatformV1DeployModelOperationMetadata: Runtime operation // information for EndpointService.DeployModel. type GoogleCloudAiplatformV1DeployModelOperationMetadata struct { + // DeploymentStage: Output only. The deployment stage of the model. + // + // Possible values: + // "DEPLOYMENT_STAGE_UNSPECIFIED" - Default value. This value is unused. + // "STARTING_DEPLOYMENT" - The deployment is initializing and setting up the + // environment. + // "PREPARING_MODEL" - The deployment is preparing the model assets. + // "CREATING_SERVING_CLUSTER" - The deployment is creating the underlying + // serving cluster. + // "ADDING_NODES_TO_CLUSTER" - The deployment is adding nodes to the serving + // cluster. + // "GETTING_CONTAINER_IMAGE" - The deployment is getting the container image + // for the model server. + // "STARTING_MODEL_SERVER" - The deployment is starting the model server. + // "FINISHING_UP" - The deployment is performing finalization steps. + // "DEPLOYMENT_TERMINATED" - The deployment has terminated. + DeploymentStage string `json:"deploymentStage,omitempty"` // GenericMetadata: The operation generic information. GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to + // ForceSendFields is a list of field names (e.g. "DeploymentStage") 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. "GenericMetadata") to include in + // NullFields is a list of field names (e.g. "DeploymentStage") 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. @@ -7642,6 +7678,13 @@ type GoogleCloudAiplatformV1DeployedIndex struct { // [d, e] is disallowed. Note: we only support up to 5 deployment groups(not // including 'default'). DeploymentGroup string `json:"deploymentGroup,omitempty"` + // DeploymentTier: Optional. The deployment tier that the index is deployed to. + // DEPLOYMENT_TIER_UNSPECIFIED defaults to PERFORMANCE. + // + // Possible values: + // "DEPLOYMENT_TIER_UNSPECIFIED" - Default deployment tier. + // "STORAGE" - Optimized for costs. + DeploymentTier string `json:"deploymentTier,omitempty"` // DisplayName: The display name of the DeployedIndex. If not provided upon // creation, the Index's display_name is used. DisplayName string `json:"displayName,omitempty"` @@ -8435,6 +8478,25 @@ func (s GoogleCloudAiplatformV1Endpoint) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1EnterpriseWebSearch: Tool to search public web data, // powered by Vertex AI Search and Sec4 compliance. type GoogleCloudAiplatformV1EnterpriseWebSearch struct { + // ExcludeDomains: Optional. List of domains to be excluded from the search + // results. The default limit is 2000 domains. + ExcludeDomains []string `json:"excludeDomains,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExcludeDomains") 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. "ExcludeDomains") 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 GoogleCloudAiplatformV1EnterpriseWebSearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1EnterpriseWebSearch + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // GoogleCloudAiplatformV1EntityIdSelector: Selector for entityId. Getting ids @@ -11659,6 +11721,145 @@ func (s GoogleCloudAiplatformV1FeatureViewDataKeyCompositeKey) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1FeatureViewDirectWriteRequest: Request message for +// FeatureOnlineStoreService.FeatureViewDirectWrite. +type GoogleCloudAiplatformV1FeatureViewDirectWriteRequest struct { + // DataKeyAndFeatureValues: Required. The data keys and associated feature + // values. + DataKeyAndFeatureValues []*GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValues `json:"dataKeyAndFeatureValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataKeyAndFeatureValues") 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. "DataKeyAndFeatureValues") 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 GoogleCloudAiplatformV1FeatureViewDirectWriteRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FeatureViewDirectWriteRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValues: +// A data key and associated feature values to write to the feature view. +type GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValues struct { + // DataKey: The data key. + DataKey *GoogleCloudAiplatformV1FeatureViewDataKey `json:"dataKey,omitempty"` + // Features: List of features to write. + Features []*GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeature `json:"features,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataKey") 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. "DataKey") 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 GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValues + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFe +// ature: Feature name & value pair. +type GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeature struct { + // Name: Feature short name. + Name string `json:"name,omitempty"` + // Value: Feature value. A user provided timestamp may be set in the + // `FeatureValue.metadata.generate_time` field. + Value *GoogleCloudAiplatformV1FeatureValue `json:"value,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 + // 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. "Name") 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 GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeature) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeature + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1FeatureViewDirectWriteResponse: Response message for +// FeatureOnlineStoreService.FeatureViewDirectWrite. +type GoogleCloudAiplatformV1FeatureViewDirectWriteResponse struct { + // Status: Response status for the keys listed in + // FeatureViewDirectWriteResponse.write_responses. The error only applies to + // the listed data keys - the stream will remain open for further + // FeatureOnlineStoreService.FeatureViewDirectWriteRequest requests. Partial + // failures (e.g. if the first 10 keys of a request fail, but the rest succeed) + // from a single request may result in multiple responses - there will be one + // response for the successful request keys and one response for the failing + // request keys. + Status *GoogleRpcStatus `json:"status,omitempty"` + // WriteResponses: Details about write for each key. If status is not OK, + // WriteResponse.data_key will have the key with error, but + // WriteResponse.online_store_write_time will not be present. + WriteResponses []*GoogleCloudAiplatformV1FeatureViewDirectWriteResponseWriteResponse `json:"writeResponses,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Status") 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. "Status") 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 GoogleCloudAiplatformV1FeatureViewDirectWriteResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FeatureViewDirectWriteResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1FeatureViewDirectWriteResponseWriteResponse: Details +// about the write for each key. +type GoogleCloudAiplatformV1FeatureViewDirectWriteResponseWriteResponse struct { + // DataKey: What key is this write response associated with. + DataKey *GoogleCloudAiplatformV1FeatureViewDataKey `json:"dataKey,omitempty"` + // OnlineStoreWriteTime: When the feature values were written to the online + // store. If FeatureViewDirectWriteResponse.status is not OK, this field is not + // populated. + OnlineStoreWriteTime string `json:"onlineStoreWriteTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataKey") 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. "DataKey") 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 GoogleCloudAiplatformV1FeatureViewDirectWriteResponseWriteResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FeatureViewDirectWriteResponseWriteResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource: A Feature Registry // source for features that need to be synced to Online Store. type GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource struct { @@ -13898,6 +14099,33 @@ func (s GoogleCloudAiplatformV1GoogleDriveSourceResourceId) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1GoogleMaps: Tool to retrieve public maps data for +// grounding, powered by Google. +type GoogleCloudAiplatformV1GoogleMaps struct { + // ApiAuth: The authentication config to access the API. Deprecated. Please use + // auth_config instead. + ApiAuth *GoogleCloudAiplatformV1ApiAuth `json:"apiAuth,omitempty"` + // AuthConfig: The authentication config to access the API. Only API key is + // supported. + AuthConfig *GoogleCloudAiplatformV1AuthConfig `json:"authConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiAuth") 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. "ApiAuth") 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 GoogleCloudAiplatformV1GoogleMaps) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GoogleMaps + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1GoogleSearchRetrieval: Tool to retrieve public web // data for grounding, powered by Google. type GoogleCloudAiplatformV1GoogleSearchRetrieval struct { @@ -14037,26 +14265,149 @@ func (s GoogleCloudAiplatformV1GroundednessSpec) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1GroundingChunk: Grounding chunk. type GoogleCloudAiplatformV1GroundingChunk struct { + // Maps: Grounding chunk from Google Maps. + Maps *GoogleCloudAiplatformV1GroundingChunkMaps `json:"maps,omitempty"` // RetrievedContext: Grounding chunk from context retrieved by the retrieval // tools. RetrievedContext *GoogleCloudAiplatformV1GroundingChunkRetrievedContext `json:"retrievedContext,omitempty"` // Web: Grounding chunk from the web. Web *GoogleCloudAiplatformV1GroundingChunkWeb `json:"web,omitempty"` - // ForceSendFields is a list of field names (e.g. "RetrievedContext") to + // ForceSendFields is a list of field names (e.g. "Maps") 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. "Maps") 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 GoogleCloudAiplatformV1GroundingChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingChunk + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingChunkMaps: Chunk from Google Maps. +type GoogleCloudAiplatformV1GroundingChunkMaps struct { + // PlaceAnswerSources: Sources used to generate the place answer. This includes + // review snippets and photos that were used to generate the answer, as well as + // uris to flag content. + PlaceAnswerSources *GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSources `json:"placeAnswerSources,omitempty"` + // PlaceId: This Place's resource name, in `places/{place_id}` format. Can be + // used to look up the Place. + PlaceId string `json:"placeId,omitempty"` + // Text: Text of the chunk. + Text string `json:"text,omitempty"` + // Title: Title of the chunk. + Title string `json:"title,omitempty"` + // Uri: URI reference of the chunk. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "PlaceAnswerSources") 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. "RetrievedContext") to include in + // NullFields is a list of field names (e.g. "PlaceAnswerSources") 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 GoogleCloudAiplatformV1GroundingChunkMaps) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingChunkMaps + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSources: Sources used to +// generate the place answer. +type GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSources struct { + // FlagContentUri: A link where users can flag a problem with the generated + // answer. + FlagContentUri string `json:"flagContentUri,omitempty"` + // ReviewSnippets: Snippets of reviews that are used to generate the answer. + ReviewSnippets []*GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet `json:"reviewSnippets,omitempty"` + // ForceSendFields is a list of field names (e.g. "FlagContentUri") 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. "FlagContentUri") 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 GoogleCloudAiplatformV1GroundingChunk) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1GroundingChunk +func (s GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSources) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSources + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution: +// +// Author attribution for a photo or review. +type GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution struct { + // DisplayName: Name of the author of the Photo or Review. + DisplayName string `json:"displayName,omitempty"` + // PhotoUri: Profile photo URI of the author of the Photo or Review. + PhotoUri string `json:"photoUri,omitempty"` + // Uri: URI of the author of the Photo or Review. + Uri string `json:"uri,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 GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet: +// Encapsulates a review snippet. +type GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet struct { + // AuthorAttribution: This review's author. + AuthorAttribution *GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution `json:"authorAttribution,omitempty"` + // FlagContentUri: A link where users can flag a problem with the review. + FlagContentUri string `json:"flagContentUri,omitempty"` + // GoogleMapsUri: A link to show the review on Google Maps. + GoogleMapsUri string `json:"googleMapsUri,omitempty"` + // RelativePublishTimeDescription: A string of formatted recent time, + // expressing the review time relative to the current time in a form + // appropriate for the language and country. + RelativePublishTimeDescription string `json:"relativePublishTimeDescription,omitempty"` + // Review: A reference representing this place review which may be used to look + // up this place review again. + Review string `json:"review,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthorAttribution") 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. "AuthorAttribution") 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 GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -14119,6 +14470,11 @@ func (s GoogleCloudAiplatformV1GroundingChunkWeb) MarshalJSON() ([]byte, error) // GoogleCloudAiplatformV1GroundingMetadata: Metadata returned to client when // grounding is enabled. type GoogleCloudAiplatformV1GroundingMetadata struct { + // GoogleMapsWidgetContextToken: Optional. Output only. Resource name of the + // Google Maps widget context token to be used with the PlacesContextElement + // widget to render contextual data. This is populated only for Google Maps + // grounding. + GoogleMapsWidgetContextToken string `json:"googleMapsWidgetContextToken,omitempty"` // GroundingChunks: List of supporting references retrieved from specified // grounding source. GroundingChunks []*GoogleCloudAiplatformV1GroundingChunk `json:"groundingChunks,omitempty"` @@ -14132,15 +14488,15 @@ type GoogleCloudAiplatformV1GroundingMetadata struct { // WebSearchQueries: Optional. Web search queries for the following-up web // search. WebSearchQueries []string `json:"webSearchQueries,omitempty"` - // ForceSendFields is a list of field names (e.g. "GroundingChunks") 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 is a list of field names (e.g. + // "GoogleMapsWidgetContextToken") 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. "GroundingChunks") 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. "GoogleMapsWidgetContextToken") 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:"-"` } @@ -14789,6 +15145,9 @@ type GoogleCloudAiplatformV1IndexDatapoint struct { CrowdingTag *GoogleCloudAiplatformV1IndexDatapointCrowdingTag `json:"crowdingTag,omitempty"` // DatapointId: Required. Unique identifier of the datapoint. DatapointId string `json:"datapointId,omitempty"` + // EmbeddingMetadata: Optional. The key-value map of additional metadata for + // the datapoint. + EmbeddingMetadata googleapi.RawMessage `json:"embeddingMetadata,omitempty"` // FeatureVector: Required. Feature embedding vector for dense index. An array // of numbers with the length of [NearestNeighborSearchConfig.dimensions]. FeatureVector []float64 `json:"featureVector,omitempty"` @@ -17110,6 +17469,7 @@ type GoogleCloudAiplatformV1MachineSpec struct { // "NVIDIA_H100_MEGA_80GB" - Nvidia H100 Mega 80Gb GPU. // "NVIDIA_H200_141GB" - Nvidia H200 141Gb GPU. // "NVIDIA_B200" - Nvidia B200 GPU. + // "NVIDIA_GB200" - Nvidia GB200 GPU. // "TPU_V2" - TPU v2. // "TPU_V3" - TPU v3. // "TPU_V4_POD" - TPU v4. @@ -23494,6 +23854,10 @@ func (s GoogleCloudAiplatformV1PublisherModelCallToActionOpenNotebooks) MarshalJ // The regional resource name or the URI. Key is region, e.g., us-central1, // europe-west2, global, etc.. type GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences struct { + // ColabNotebookDisabled: Optional. For notebook resource. When set to true, + // the Colab Enterprise link will be disabled in the "open notebook" dialog in + // UI. + ColabNotebookDisabled bool `json:"colabNotebookDisabled,omitempty"` // References: Required. References map[string]GoogleCloudAiplatformV1PublisherModelResourceReference `json:"references,omitempty"` // ResourceDescription: Optional. Description of the resource. @@ -23507,15 +23871,15 @@ type GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences SupportsWorkbench bool `json:"supportsWorkbench,omitempty"` // Title: Required. Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "References") to + // ForceSendFields is a list of field names (e.g. "ColabNotebookDisabled") 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. "References") 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. "ColabNotebookDisabled") 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:"-"` } @@ -25843,6 +26207,10 @@ type GoogleCloudAiplatformV1ReasoningEngine struct { Description string `json:"description,omitempty"` // DisplayName: Required. The display name of the ReasoningEngine. DisplayName string `json:"displayName,omitempty"` + // EncryptionSpec: Customer-managed encryption key spec for a ReasoningEngine. + // If set, this ReasoningEngine and all sub-resources of this ReasoningEngine + // will be secured by this key. + EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` // Etag: Optional. Used to perform consistent read-modify-write updates. If not // set, a blind "overwrite" update happens. Etag string `json:"etag,omitempty"` @@ -25892,6 +26260,12 @@ type GoogleCloudAiplatformV1ReasoningEngineSpec struct { // `deployment_spec.first_party_image_override`, but keeping the field_behavior // to avoid introducing breaking changes. PackageSpec *GoogleCloudAiplatformV1ReasoningEngineSpecPackageSpec `json:"packageSpec,omitempty"` + // ServiceAccount: Optional. The service account that the Reasoning Engine + // artifact runs as. It should have "roles/storage.objectViewer" for reading + // the user project's Cloud Storage and "roles/aiplatform.user" for using + // Vertex extensions. If not specified, the Vertex AI Reasoning Engine Service + // Agent in the project will be used. + ServiceAccount string `json:"serviceAccount,omitempty"` // ForceSendFields is a list of field names (e.g. "AgentFramework") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -37593,10 +37967,6 @@ type GoogleCloudAiplatformV1Tool struct { // CodeExecution: Optional. CodeExecution tool type. Enables the model to // execute code as part of generation. CodeExecution *GoogleCloudAiplatformV1ToolCodeExecution `json:"codeExecution,omitempty"` - // ComputerUse: Optional. Tool to support the model interacting directly with - // the computer. If enabled, it automatically populates computer-use specific - // Function Declarations. - ComputerUse *GoogleCloudAiplatformV1ToolComputerUse `json:"computerUse,omitempty"` // EnterpriseWebSearch: Optional. Tool to support searching public web data, // powered by Vertex AI Search and Sec4 compliance. EnterpriseWebSearch *GoogleCloudAiplatformV1EnterpriseWebSearch `json:"enterpriseWebSearch,omitempty"` @@ -37605,9 +37975,12 @@ type GoogleCloudAiplatformV1Tool struct { // Model may decide to call a subset of these functions by populating // FunctionCall in the response. User should provide a FunctionResponse for // each function call in the next turn. Based on the function responses, Model - // will generate the final response back to the user. Maximum 128 function + // will generate the final response back to the user. Maximum 512 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleMaps: Optional. GoogleMaps tool type. Tool to support Google Maps in + // Model. + GoogleMaps *GoogleCloudAiplatformV1GoogleMaps `json:"googleMaps,omitempty"` // GoogleSearch: Optional. GoogleSearch tool type. Tool to support Google // Search in Model. Powered by Google. GoogleSearch *GoogleCloudAiplatformV1ToolGoogleSearch `json:"googleSearch,omitempty"` @@ -37782,32 +38155,6 @@ type GoogleCloudAiplatformV1ToolCallValidSpec struct { type GoogleCloudAiplatformV1ToolCodeExecution struct { } -// GoogleCloudAiplatformV1ToolComputerUse: Tool to support computer use. -type GoogleCloudAiplatformV1ToolComputerUse struct { - // Environment: Required. The environment being operated. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Defaults to browser. - // "ENVIRONMENT_BROWSER" - Operates in a web browser. - Environment string `json:"environment,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environment") 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. "Environment") 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 GoogleCloudAiplatformV1ToolComputerUse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1ToolComputerUse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1ToolConfig: Tool config. This config is shared for // all tools provided in the request. type GoogleCloudAiplatformV1ToolConfig struct { @@ -37836,6 +38183,26 @@ func (s GoogleCloudAiplatformV1ToolConfig) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1ToolGoogleSearch: GoogleSearch tool type. Tool to // support Google Search in Model. Powered by Google. type GoogleCloudAiplatformV1ToolGoogleSearch struct { + // ExcludeDomains: Optional. List of domains to be excluded from the search + // results. The default limit is 2000 domains. Example: ["amazon.com", + // "facebook.com"]. + ExcludeDomains []string `json:"excludeDomains,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExcludeDomains") 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. "ExcludeDomains") 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 GoogleCloudAiplatformV1ToolGoogleSearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolGoogleSearch + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // GoogleCloudAiplatformV1ToolNameMatchInput: Input for tool name match metric. @@ -40489,6 +40856,9 @@ func (s GoogleCloudAiplatformV1VertexRagStoreRagResource) MarshalJSON() ([]byte, type GoogleCloudAiplatformV1VideoMetadata struct { // EndOffset: Optional. The end offset of the video. EndOffset string `json:"endOffset,omitempty"` + // Fps: Optional. The frame rate of the video sent to the model. If not + // specified, the default value will be 1.0. The fps range is (0.0, 24.0]. + Fps float64 `json:"fps,omitempty"` // StartOffset: Optional. The start offset of the video. StartOffset string `json:"startOffset,omitempty"` // ForceSendFields is a list of field names (e.g. "EndOffset") to @@ -40509,6 +40879,20 @@ func (s GoogleCloudAiplatformV1VideoMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudAiplatformV1VideoMetadata) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1VideoMetadata + var s1 struct { + Fps gensupport.JSONFloat64 `json:"fps"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Fps = float64(s1.Fps) + return nil +} + // GoogleCloudAiplatformV1VoiceConfig: The configuration for the voice to use. type GoogleCloudAiplatformV1VoiceConfig struct { // PrebuiltVoiceConfig: The configuration for the prebuilt voice to use. @@ -62854,6 +63238,114 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Do(opts ... return ret, nil } +type ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall struct { + s *Service + featureView string + googlecloudaiplatformv1featureviewdirectwriterequest *GoogleCloudAiplatformV1FeatureViewDirectWriteRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DirectWrite: Bidirectional streaming RPC to directly write to feature values +// in a feature view. Requests may not have a one-to-one mapping to responses +// and responses may be returned out-of-order to reduce latency. +// +// - featureView: FeatureView resource format +// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline +// Store}/featureViews/{featureView}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) DirectWrite(featureView string, googlecloudaiplatformv1featureviewdirectwriterequest *GoogleCloudAiplatformV1FeatureViewDirectWriteRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.featureView = featureView + c.googlecloudaiplatformv1featureviewdirectwriterequest = googlecloudaiplatformv1featureviewdirectwriterequest + 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall { + 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudaiplatformv1featureviewdirectwriterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:directWrite") + 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{ + "featureView": c.featureView, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "aiplatform.projects.locations.featureOnlineStores.featureViews.directWrite", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.directWrite" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1FeatureViewDirectWriteResponse.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsDirectWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureViewDirectWriteResponse, 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 := &GoogleCloudAiplatformV1FeatureViewDirectWriteResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "aiplatform.projects.locations.featureOnlineStores.featureViews.directWrite", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall struct { s *Service featureView string diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index ca87593bf5..7c24fa2e06 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -24187,6 +24187,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "optimizePrompt": { + "description": "Optimizes a prompt.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tuningJobs:optimizePrompt", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.tuningJobs.optimizePrompt", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the Location to optimize the prompt in. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/tuningJobs:optimizePrompt", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1OptimizePromptRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1OptimizePromptResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "rebaseTunedModel": { "description": "Rebase a TunedModel.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tuningJobs:rebaseTunedModel", @@ -25320,7 +25348,7 @@ } } }, - "revision": "20250715", + "revision": "20250731", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -26095,14 +26123,6 @@ "geminiRequestReadConfig": { "$ref": "GoogleCloudAiplatformV1beta1GeminiRequestReadConfig", "description": "Optional. The read config for the dataset." - }, - "geminiTemplateConfig": { - "$ref": "GoogleCloudAiplatformV1beta1GeminiTemplateConfig", - "description": "Optional. Config for assembling templates with a Gemini API structure." - }, - "requestColumnName": { - "description": "Optional. The column name in the underlying table that contains already fully assembled requests. If this field is set, the original request will be copied to the output table.", - "type": "string" } }, "type": "object" @@ -26123,14 +26143,6 @@ "$ref": "GoogleCloudAiplatformV1beta1GeminiRequestReadConfig", "description": "Optional. The Gemini request read config for the dataset." }, - "geminiTemplateConfig": { - "$ref": "GoogleCloudAiplatformV1beta1GeminiTemplateConfig", - "description": "Optional. Config for assembling templates with a Gemini API structure to assess assembled data." - }, - "requestColumnName": { - "description": "Optional. The column name in the underlying table that contains already fully assembled requests.", - "type": "string" - }, "tuningResourceUsageAssessmentConfig": { "$ref": "GoogleCloudAiplatformV1beta1AssessDataRequestTuningResourceUsageAssessmentConfig", "description": "Optional. Configuration for the tuning resource usage assessment." @@ -26523,7 +26535,7 @@ "id": "GoogleCloudAiplatformV1beta1AutoscalingMetricSpec", "properties": { "metricName": { - "description": "Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization`", + "description": "Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization` * `aiplatform.googleapis.com/prediction/online/request_count`", "type": "string" }, "target": { @@ -26672,6 +26684,10 @@ "description": "A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration.", "id": "GoogleCloudAiplatformV1beta1BatchDedicatedResources", "properties": { + "flexStart": { + "$ref": "GoogleCloudAiplatformV1beta1FlexStart", + "description": "Optional. Immutable. If set, use DWS resource to schedule the deployment workload. reference: (https://cloud.google.com/blog/products/compute/introducing-dynamic-workload-scheduler)" + }, "machineSpec": { "$ref": "GoogleCloudAiplatformV1beta1MachineSpec", "description": "Required. Immutable. The specification of a single machine." @@ -26681,6 +26697,10 @@ "format": "int32", "type": "integer" }, + "spot": { + "description": "Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).", + "type": "boolean" + }, "startingReplicaCount": { "description": "Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count", "format": "int32", @@ -28495,6 +28515,33 @@ "description": "Runtime operation information for EndpointService.CreateEndpoint.", "id": "GoogleCloudAiplatformV1beta1CreateEndpointOperationMetadata", "properties": { + "deploymentStage": { + "description": "Output only. The deployment stage of the model. Only populated if this CreateEndpoint request deploys a model at the same time.", + "enum": [ + "DEPLOYMENT_STAGE_UNSPECIFIED", + "STARTING_DEPLOYMENT", + "PREPARING_MODEL", + "CREATING_SERVING_CLUSTER", + "ADDING_NODES_TO_CLUSTER", + "GETTING_CONTAINER_IMAGE", + "STARTING_MODEL_SERVER", + "FINISHING_UP", + "DEPLOYMENT_TERMINATED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The deployment is initializing and setting up the environment.", + "The deployment is preparing the model assets.", + "The deployment is creating the underlying serving cluster.", + "The deployment is adding nodes to the serving cluster.", + "The deployment is getting the container image for the model server.", + "The deployment is starting the model server.", + "The deployment is performing finalization steps.", + "The deployment has terminated." + ], + "readOnly": true, + "type": "string" + }, "genericMetadata": { "$ref": "GoogleCloudAiplatformV1beta1GenericOperationMetadata", "description": "The operation generic information." @@ -29753,6 +29800,33 @@ "description": "Runtime operation information for EndpointService.DeployModel.", "id": "GoogleCloudAiplatformV1beta1DeployModelOperationMetadata", "properties": { + "deploymentStage": { + "description": "Output only. The deployment stage of the model.", + "enum": [ + "DEPLOYMENT_STAGE_UNSPECIFIED", + "STARTING_DEPLOYMENT", + "PREPARING_MODEL", + "CREATING_SERVING_CLUSTER", + "ADDING_NODES_TO_CLUSTER", + "GETTING_CONTAINER_IMAGE", + "STARTING_MODEL_SERVER", + "FINISHING_UP", + "DEPLOYMENT_TERMINATED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The deployment is initializing and setting up the environment.", + "The deployment is preparing the model assets.", + "The deployment is creating the underlying serving cluster.", + "The deployment is adding nodes to the serving cluster.", + "The deployment is getting the container image for the model server.", + "The deployment is starting the model server.", + "The deployment is performing finalization steps.", + "The deployment has terminated." + ], + "readOnly": true, + "type": "string" + }, "genericMetadata": { "$ref": "GoogleCloudAiplatformV1beta1GenericOperationMetadata", "description": "The operation generic information." @@ -29974,6 +30048,18 @@ "description": "Optional. The deployment group can be no longer than 64 characters (eg: 'test', 'prod'). If not set, we will use the 'default' deployment group. Creating `deployment_groups` with `reserved_ip_ranges` is a recommended practice when the peered network has multiple peering ranges. This creates your deployments from predictable IP spaces for easier traffic administration. Also, one deployment_group (except 'default') can only be used with the same reserved_ip_ranges which means if the deployment_group has been used with reserved_ip_ranges: [a, b, c], using it with [a, b] or [d, e] is disallowed. Note: we only support up to 5 deployment groups(not including 'default').", "type": "string" }, + "deploymentTier": { + "description": "Optional. The deployment tier that the index is deployed to. DEPLOYMENT_TIER_UNSPECIFIED defaults to PERFORMANCE.", + "enum": [ + "DEPLOYMENT_TIER_UNSPECIFIED", + "STORAGE" + ], + "enumDescriptions": [ + "Default deployment tier.", + "Optimized for costs." + ], + "type": "string" + }, "displayName": { "description": "The display name of the DeployedIndex. If not provided upon creation, the Index's display_name is used.", "type": "string" @@ -30636,7 +30722,15 @@ "GoogleCloudAiplatformV1beta1EnterpriseWebSearch": { "description": "Tool to search public web data, powered by Vertex AI Search and Sec4 compliance.", "id": "GoogleCloudAiplatformV1beta1EnterpriseWebSearch", - "properties": {}, + "properties": { + "excludeDomains": { + "description": "Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, "GoogleCloudAiplatformV1beta1EntityIdSelector": { @@ -33692,6 +33786,10 @@ "description": "Feature short name.", "type": "string" }, + "value": { + "$ref": "GoogleCloudAiplatformV1beta1FeatureValue", + "description": "Feature value. A user provided timestamp may be set in the `FeatureValue.metadata.generate_time` field." + }, "valueAndTimestamp": { "$ref": "GoogleCloudAiplatformV1beta1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeatureFeatureValueAndTimestamp", "description": "Feature value and timestamp." @@ -34943,6 +35041,43 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1GeminiPreferenceExample": { + "description": "Input example for preference optimization.", + "id": "GoogleCloudAiplatformV1beta1GeminiPreferenceExample", + "properties": { + "completions": { + "description": "List of completions for a given prompt.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion" + }, + "type": "array" + }, + "contents": { + "description": "Multi-turn contents that represents the Prompt.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Content" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion": { + "description": "Completion and its preference score.", + "id": "GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion", + "properties": { + "completion": { + "$ref": "GoogleCloudAiplatformV1beta1Content", + "description": "Single turn completion for the given prompt." + }, + "score": { + "description": "The score for the given completion.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1GeminiRequestReadConfig": { "description": "Configuration for how to read Gemini requests from a multimodal dataset.", "id": "GoogleCloudAiplatformV1beta1GeminiRequestReadConfig", @@ -35260,6 +35395,10 @@ "$ref": "GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectContentsSource", "description": "Defines a direct source of content as the source content from which to generate memories." }, + "directMemoriesSource": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSource", + "description": "Defines a direct source of memories that should be uploaded to Memory Bank. This is similar to `CreateMemory`, but it allows for consolidation between these new memories and existing memories for the same scope." + }, "disableConsolidation": { "description": "Optional. If true, generated memories will not be consolidated with existing memories; all generated memories will be added as new memories regardless of whether they are duplicates of or contradictory to existing memories. By default, memory consolidation is enabled.", "type": "boolean" @@ -35303,6 +35442,31 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSource": { + "description": "Defines a direct source of memories that should be uploaded to Memory Bank with consolidation.", + "id": "GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSource", + "properties": { + "directMemories": { + "description": "Required. The direct memories to upload to Memory Bank. At most 5 direct memories are allowed per request.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSourceDirectMemory" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSourceDirectMemory": { + "description": "A direct memory to upload to Memory Bank.", + "id": "GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSourceDirectMemory", + "properties": { + "fact": { + "description": "Required. The fact to consolidate with existing memories.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1GenerateMemoriesRequestVertexSessionSource": { "description": "Defines an Agent Engine Session from which to generate the memories. If `scope` is not provided, the scope will be extracted from the Session (i.e. {\"user_id\": sesison.user_id}).", "id": "GoogleCloudAiplatformV1beta1GenerateMemoriesRequestVertexSessionSource", @@ -35676,6 +35840,22 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1GoogleMaps": { + "description": "Tool to retrieve public maps data for grounding, powered by Google.", + "id": "GoogleCloudAiplatformV1beta1GoogleMaps", + "properties": { + "apiAuth": { + "$ref": "GoogleCloudAiplatformV1beta1ApiAuth", + "deprecated": true, + "description": "The authentication config to access the API. Deprecated. Please use auth_config instead." + }, + "authConfig": { + "$ref": "GoogleCloudAiplatformV1beta1AuthConfig", + "description": "The authentication config to access the API. Only API key is supported." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval": { "description": "Tool to retrieve public web data for grounding, powered by Google.", "id": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", @@ -35757,6 +35937,10 @@ "description": "Grounding chunk.", "id": "GoogleCloudAiplatformV1beta1GroundingChunk", "properties": { + "maps": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingChunkMaps", + "description": "Grounding chunk from Google Maps." + }, "retrievedContext": { "$ref": "GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext", "description": "Grounding chunk from context retrieved by the retrieval tools." @@ -35768,6 +35952,97 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1GroundingChunkMaps": { + "description": "Chunk from Google Maps.", + "id": "GoogleCloudAiplatformV1beta1GroundingChunkMaps", + "properties": { + "placeAnswerSources": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSources", + "description": "Sources used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as uris to flag content." + }, + "placeId": { + "description": "This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place.", + "type": "string" + }, + "text": { + "description": "Text of the chunk.", + "type": "string" + }, + "title": { + "description": "Title of the chunk.", + "type": "string" + }, + "uri": { + "description": "URI reference of the chunk.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSources": { + "description": "Sources used to generate the place answer.", + "id": "GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSources", + "properties": { + "flagContentUri": { + "description": "A link where users can flag a problem with the generated answer.", + "type": "string" + }, + "reviewSnippets": { + "description": "Snippets of reviews that are used to generate the answer.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution": { + "description": "Author attribution for a photo or review.", + "id": "GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution", + "properties": { + "displayName": { + "description": "Name of the author of the Photo or Review.", + "type": "string" + }, + "photoUri": { + "description": "Profile photo URI of the author of the Photo or Review.", + "type": "string" + }, + "uri": { + "description": "URI of the author of the Photo or Review.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet": { + "description": "Encapsulates a review snippet.", + "id": "GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet", + "properties": { + "authorAttribution": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution", + "description": "This review's author." + }, + "flagContentUri": { + "description": "A link where users can flag a problem with the review.", + "type": "string" + }, + "googleMapsUri": { + "description": "A link to show the review on Google Maps.", + "type": "string" + }, + "relativePublishTimeDescription": { + "description": "A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country.", + "type": "string" + }, + "review": { + "description": "A reference representing this place review which may be used to look up this place review again.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext": { "description": "Chunk from context retrieved by the retrieval tools.", "id": "GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext", @@ -35814,6 +36089,11 @@ "description": "Metadata returned to client when grounding is enabled.", "id": "GoogleCloudAiplatformV1beta1GroundingMetadata", "properties": { + "googleMapsWidgetContextToken": { + "description": "Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding.", + "readOnly": true, + "type": "string" + }, "groundingChunks": { "description": "List of supporting references retrieved from specified grounding source.", "items": { @@ -36568,6 +36848,14 @@ "description": "Required. Unique identifier of the datapoint.", "type": "string" }, + "embeddingMetadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. The key-value map of additional metadata for the datapoint.", + "type": "object" + }, "featureVector": { "description": "Required. Feature embedding vector for dense index. An array of numbers with the length of [NearestNeighborSearchConfig.dimensions].", "items": { @@ -38297,6 +38585,7 @@ "NVIDIA_H100_MEGA_80GB", "NVIDIA_H200_141GB", "NVIDIA_B200", + "NVIDIA_GB200", "TPU_V2", "TPU_V3", "TPU_V4_POD", @@ -38319,6 +38608,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -38335,6 +38625,7 @@ "Nvidia H100 Mega 80Gb GPU.", "Nvidia H200 141Gb GPU.", "Nvidia B200 GPU.", + "Nvidia GB200 GPU.", "TPU v2.", "TPU v3.", "TPU v4.", @@ -42321,6 +42612,29 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1OptimizePromptRequest": { + "description": "Request message for GenAiTuningService.OptimizePrompt.", + "id": "GoogleCloudAiplatformV1beta1OptimizePromptRequest", + "properties": { + "content": { + "$ref": "GoogleCloudAiplatformV1beta1Content", + "description": "Required. The content to optimize." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1OptimizePromptResponse": { + "description": "Response message for GenAiTuningService.OptimizePrompt", + "id": "GoogleCloudAiplatformV1beta1OptimizePromptResponse", + "properties": { + "content": { + "$ref": "GoogleCloudAiplatformV1beta1Content", + "description": "Output only. The optimized prompt content.", + "readOnly": true + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1OutputConfig": { "description": "Config for evaluation output.", "id": "GoogleCloudAiplatformV1beta1OutputConfig", @@ -43588,6 +43902,26 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PreTunedModel": { + "description": "A pre-tuned model for continuous tuning.", + "id": "GoogleCloudAiplatformV1beta1PreTunedModel", + "properties": { + "baseModel": { + "description": "Output only. The name of the base model this PreTunedModel was tuned from.", + "readOnly": true, + "type": "string" + }, + "checkpointId": { + "description": "Optional. The source checkpoint id. If not specified, the default checkpoint will be used.", + "type": "string" + }, + "tunedModelName": { + "description": "The resource name of the Model. E.g., a model resource name with a specified version id or alias: `projects/{project}/locations/{location}/models/{model}@{version_id}` `projects/{project}/locations/{location}/models/{model}@{alias}` Or, omit the version id to use the default version: `projects/{project}/locations/{location}/models/{model}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig": { "description": "The configuration for the prebuilt speaker to use.", "id": "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig", @@ -43749,6 +44083,122 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PreferenceOptimizationDataStats": { + "description": "Statistics computed for datasets used for preference optimization.", + "id": "GoogleCloudAiplatformV1beta1PreferenceOptimizationDataStats", + "properties": { + "scoreVariancePerExampleDistribution": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetDistribution", + "description": "Output only. Dataset distributions for scores variance per example.", + "readOnly": true + }, + "scoresDistribution": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetDistribution", + "description": "Output only. Dataset distributions for scores.", + "readOnly": true + }, + "totalBillableTokenCount": { + "description": "Output only. Number of billable tokens in the tuning dataset.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "tuningDatasetExampleCount": { + "description": "Output only. Number of examples in the tuning dataset.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "tuningStepCount": { + "description": "Output only. Number of tuning steps for this Tuning Job.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "userDatasetExamples": { + "description": "Output only. Sample user examples in the training dataset.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1GeminiPreferenceExample" + }, + "readOnly": true, + "type": "array" + }, + "userInputTokenDistribution": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetDistribution", + "description": "Output only. Dataset distributions for the user input tokens.", + "readOnly": true + }, + "userOutputTokenDistribution": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetDistribution", + "description": "Output only. Dataset distributions for the user output tokens.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters": { + "description": "Hyperparameters for Preference Optimization.", + "id": "GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters", + "properties": { + "adapterSize": { + "description": "Optional. Adapter size for preference optimization.", + "enum": [ + "ADAPTER_SIZE_UNSPECIFIED", + "ADAPTER_SIZE_ONE", + "ADAPTER_SIZE_TWO", + "ADAPTER_SIZE_FOUR", + "ADAPTER_SIZE_EIGHT", + "ADAPTER_SIZE_SIXTEEN", + "ADAPTER_SIZE_THIRTY_TWO" + ], + "enumDescriptions": [ + "Adapter size is unspecified.", + "Adapter size 1.", + "Adapter size 2.", + "Adapter size 4.", + "Adapter size 8.", + "Adapter size 16.", + "Adapter size 32." + ], + "type": "string" + }, + "beta": { + "description": "Optional. Weight for KL Divergence regularization.", + "format": "double", + "type": "number" + }, + "epochCount": { + "description": "Optional. Number of complete passes the model makes over the entire training dataset during training.", + "format": "int64", + "type": "string" + }, + "learningRateMultiplier": { + "description": "Optional. Multiplier for adjusting the default learning rate.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PreferenceOptimizationSpec": { + "description": "Tuning Spec for Preference Optimization.", + "id": "GoogleCloudAiplatformV1beta1PreferenceOptimizationSpec", + "properties": { + "hyperParameters": { + "$ref": "GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters", + "description": "Optional. Hyperparameters for Preference Optimization." + }, + "trainingDatasetUri": { + "description": "Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.", + "type": "string" + }, + "validationDatasetUri": { + "description": "Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Presets": { "description": "Preset configuration for example-based explanations", "id": "GoogleCloudAiplatformV1beta1Presets", @@ -44307,6 +44757,10 @@ "description": "The regional resource name or the URI. Key is region, e.g., us-central1, europe-west2, global, etc..", "id": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences", "properties": { + "colabNotebookDisabled": { + "description": "Optional. For notebook resource. When set to true, the Colab Enterprise link will be disabled in the \"open notebook\" dialog in UI.", + "type": "boolean" + }, "references": { "additionalProperties": { "$ref": "GoogleCloudAiplatformV1beta1PublisherModelResourceReference" @@ -46178,6 +46632,10 @@ "description": "Required. The display name of the ReasoningEngine.", "type": "string" }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1beta1EncryptionSpec", + "description": "Customer-managed encryption key spec for a ReasoningEngine. If set, this ReasoningEngine and all sub-resources of this ReasoningEngine will be secured by this key." + }, "etag": { "description": "Optional. Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", "type": "string" @@ -46273,6 +46731,10 @@ "packageSpec": { "$ref": "GoogleCloudAiplatformV1beta1ReasoningEngineSpecPackageSpec", "description": "Optional. User provided package spec of the ReasoningEngine. Ignored when users directly specify a deployment image through `deployment_spec.first_party_image_override`, but keeping the field_behavior to avoid introducing breaking changes." + }, + "serviceAccount": { + "description": "Optional. The service account that the Reasoning Engine artifact runs as. It should have \"roles/storage.objectViewer\" for reading the user project's Cloud Storage and \"roles/aiplatform.user\" for using Vertex extensions. If not specified, the Vertex AI Reasoning Engine Service Agent in the project will be used.", + "type": "string" } }, "type": "object" @@ -54051,11 +54513,21 @@ ], "type": "string" }, + "batchSize": { + "description": "Optional. Batch size for tuning. This feature is only available for open source models.", + "format": "int64", + "type": "string" + }, "epochCount": { "description": "Optional. Number of complete passes the model makes over the entire training dataset during training.", "format": "int64", "type": "string" }, + "learningRate": { + "description": "Optional. Learning rate for tuning. Mutually exclusive with `learning_rate_multiplier`. This feature is only available for open source models.", + "format": "double", + "type": "number" + }, "learningRateMultiplier": { "description": "Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models.", "format": "double", @@ -54252,6 +54724,20 @@ "description": "Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.", "type": "string" }, + "tuningMode": { + "description": "Tuning mode.", + "enum": [ + "TUNING_MODE_UNSPECIFIED", + "TUNING_MODE_FULL", + "TUNING_MODE_PEFT_ADAPTER" + ], + "enumDescriptions": [ + "Tuning mode is unspecified.", + "Full fine-tuning mode.", + "PEFT adapter tuning mode." + ], + "type": "string" + }, "validationDatasetUri": { "description": "Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.", "type": "string" @@ -54862,21 +55348,21 @@ "$ref": "GoogleCloudAiplatformV1beta1ToolCodeExecution", "description": "Optional. CodeExecution tool type. Enables the model to execute code as part of generation." }, - "computerUse": { - "$ref": "GoogleCloudAiplatformV1beta1ToolComputerUse", - "description": "Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations." - }, "enterpriseWebSearch": { "$ref": "GoogleCloudAiplatformV1beta1EnterpriseWebSearch", "description": "Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance." }, "functionDeclarations": { - "description": "Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided.", + "description": "Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.", "items": { "$ref": "GoogleCloudAiplatformV1beta1FunctionDeclaration" }, "type": "array" }, + "googleMaps": { + "$ref": "GoogleCloudAiplatformV1beta1GoogleMaps", + "description": "Optional. GoogleMaps tool type. Tool to support Google Maps in Model." + }, "googleSearch": { "$ref": "GoogleCloudAiplatformV1beta1ToolGoogleSearch", "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google." @@ -54984,25 +55470,6 @@ "properties": {}, "type": "object" }, - "GoogleCloudAiplatformV1beta1ToolComputerUse": { - "description": "Tool to support computer use.", - "id": "GoogleCloudAiplatformV1beta1ToolComputerUse", - "properties": { - "environment": { - "description": "Required. The environment being operated.", - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "ENVIRONMENT_BROWSER" - ], - "enumDescriptions": [ - "Defaults to browser.", - "Operates in a web browser." - ], - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1ToolConfig": { "description": "Tool config. This config is shared for all tools provided in the request.", "id": "GoogleCloudAiplatformV1beta1ToolConfig", @@ -55021,7 +55488,15 @@ "GoogleCloudAiplatformV1beta1ToolGoogleSearch": { "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", "id": "GoogleCloudAiplatformV1beta1ToolGoogleSearch", - "properties": {}, + "properties": { + "excludeDomains": { + "description": "Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [\"amazon.com\", \"facebook.com\"].", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, "GoogleCloudAiplatformV1beta1ToolNameMatchInput": { @@ -56035,6 +56510,11 @@ "description": "Output only. Statistics for distillation.", "readOnly": true }, + "preferenceOptimizationDataStats": { + "$ref": "GoogleCloudAiplatformV1beta1PreferenceOptimizationDataStats", + "description": "Output only. Statistics for preference optimization.", + "readOnly": true + }, "supervisedTuningDataStats": { "$ref": "GoogleCloudAiplatformV1beta1SupervisedTuningDataStats", "description": "The SFT Tuning data stats." @@ -56056,6 +56536,10 @@ "readOnly": true, "type": "string" }, + "customBaseModel": { + "description": "Optional. The user-provided path to custom model weights. Set this field to tune a custom model. The path must be a Cloud Storage directory that contains the model weights in .safetensors format along with associated model metadata files. If this field is set, the base_model field must still be set to indicate which base model the custom model is derived from. This feature is only available for open source models.", + "type": "string" + }, "description": { "description": "Optional. The description of the TuningJob.", "type": "string" @@ -56096,6 +56580,10 @@ "readOnly": true, "type": "string" }, + "outputUri": { + "description": "Optional. Cloud Storage path to the directory where tuning job outputs are written to. This field is only available and required for open source models.", + "type": "string" + }, "partnerModelTuningSpec": { "$ref": "GoogleCloudAiplatformV1beta1PartnerModelTuningSpec", "description": "Tuning Spec for open sourced and third party Partner models." @@ -56106,6 +56594,14 @@ "readOnly": true, "type": "string" }, + "preTunedModel": { + "$ref": "GoogleCloudAiplatformV1beta1PreTunedModel", + "description": "The pre-tuned model for continuous tuning." + }, + "preferenceOptimizationSpec": { + "$ref": "GoogleCloudAiplatformV1beta1PreferenceOptimizationSpec", + "description": "Tuning Spec for Preference Optimization." + }, "satisfiesPzi": { "description": "Output only. Reserved for future use.", "readOnly": true, @@ -56182,6 +56678,10 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "veoTuningSpec": { + "$ref": "GoogleCloudAiplatformV1beta1VeoTuningSpec", + "description": "Tuning Spec for Veo Tuning." } }, "type": "object" @@ -56747,6 +57247,56 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1VeoHyperParameters": { + "description": "Hyperparameters for Veo.", + "id": "GoogleCloudAiplatformV1beta1VeoHyperParameters", + "properties": { + "epochCount": { + "description": "Optional. Number of complete passes the model makes over the entire training dataset during training.", + "format": "int64", + "type": "string" + }, + "learningRateMultiplier": { + "description": "Optional. Multiplier for adjusting the default learning rate.", + "format": "double", + "type": "number" + }, + "tuningTask": { + "description": "Optional. The tuning task. Either I2V or T2V.", + "enum": [ + "TUNING_TASK_UNSPECIFIED", + "TUNING_TASK_I2V", + "TUNING_TASK_T2V" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Tuning task for image to video.", + "Tuning task for text to video." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1VeoTuningSpec": { + "description": "Tuning Spec for Veo Model Tuning.", + "id": "GoogleCloudAiplatformV1beta1VeoTuningSpec", + "properties": { + "hyperParameters": { + "$ref": "GoogleCloudAiplatformV1beta1VeoHyperParameters", + "description": "Optional. Hyperparameters for Veo." + }, + "trainingDatasetUri": { + "description": "Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.", + "type": "string" + }, + "validationDatasetUri": { + "description": "Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1VertexAISearch": { "description": "Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder", "id": "GoogleCloudAiplatformV1beta1VertexAISearch", @@ -56873,6 +57423,11 @@ "format": "google-duration", "type": "string" }, + "fps": { + "description": "Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0].", + "format": "double", + "type": "number" + }, "startOffset": { "description": "Optional. The start offset of the video.", "format": "google-duration", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index a066b7c2d6..828d3e549f 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -3020,13 +3020,6 @@ func (s GoogleCloudAiplatformV1beta1ArtifactTypeSchema) MarshalJSON() ([]byte, e type GoogleCloudAiplatformV1beta1AssembleDataRequest struct { // GeminiRequestReadConfig: Optional. The read config for the dataset. GeminiRequestReadConfig *GoogleCloudAiplatformV1beta1GeminiRequestReadConfig `json:"geminiRequestReadConfig,omitempty"` - // GeminiTemplateConfig: Optional. Config for assembling templates with a - // Gemini API structure. - GeminiTemplateConfig *GoogleCloudAiplatformV1beta1GeminiTemplateConfig `json:"geminiTemplateConfig,omitempty"` - // RequestColumnName: Optional. The column name in the underlying table that - // contains already fully assembled requests. If this field is set, the - // original request will be copied to the output table. - RequestColumnName string `json:"requestColumnName,omitempty"` // ForceSendFields is a list of field names (e.g. "GeminiRequestReadConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3057,12 +3050,6 @@ type GoogleCloudAiplatformV1beta1AssessDataRequest struct { // GeminiRequestReadConfig: Optional. The Gemini request read config for the // dataset. GeminiRequestReadConfig *GoogleCloudAiplatformV1beta1GeminiRequestReadConfig `json:"geminiRequestReadConfig,omitempty"` - // GeminiTemplateConfig: Optional. Config for assembling templates with a - // Gemini API structure to assess assembled data. - GeminiTemplateConfig *GoogleCloudAiplatformV1beta1GeminiTemplateConfig `json:"geminiTemplateConfig,omitempty"` - // RequestColumnName: Optional. The column name in the underlying table that - // contains already fully assembled requests. - RequestColumnName string `json:"requestColumnName,omitempty"` // TuningResourceUsageAssessmentConfig: Optional. Configuration for the tuning // resource usage assessment. TuningResourceUsageAssessmentConfig *GoogleCloudAiplatformV1beta1AssessDataRequestTuningResourceUsageAssessmentConfig `json:"tuningResourceUsageAssessmentConfig,omitempty"` @@ -3715,7 +3702,8 @@ type GoogleCloudAiplatformV1beta1AutoscalingMetricSpec struct { // MetricName: Required. The resource metric name. Supported metrics: * For // Online Prediction: * // `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * - // `aiplatform.googleapis.com/prediction/online/cpu/utilization` + // `aiplatform.googleapis.com/prediction/online/cpu/utilization` * + // `aiplatform.googleapis.com/prediction/online/request_count` MetricName string `json:"metricName,omitempty"` // Target: The target resource utilization in percentage (1% - 100%) for the // given metric; once the real usage deviates from the target by a certain @@ -3990,22 +3978,29 @@ func (s GoogleCloudAiplatformV1beta1BatchCreateTensorboardTimeSeriesResponse) Ma // resources that are used for performing batch operations, are dedicated to a // Model, and need manual configuration. type GoogleCloudAiplatformV1beta1BatchDedicatedResources struct { + // FlexStart: Optional. Immutable. If set, use DWS resource to schedule the + // deployment workload. reference: + // (https://cloud.google.com/blog/products/compute/introducing-dynamic-workload-scheduler) + FlexStart *GoogleCloudAiplatformV1beta1FlexStart `json:"flexStart,omitempty"` // MachineSpec: Required. Immutable. The specification of a single machine. MachineSpec *GoogleCloudAiplatformV1beta1MachineSpec `json:"machineSpec,omitempty"` // MaxReplicaCount: Immutable. The maximum number of machine replicas the batch // operation may be scaled to. The default value is 10. MaxReplicaCount int64 `json:"maxReplicaCount,omitempty"` + // Spot: Optional. If true, schedule the deployment workload on spot VMs + // (https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). + Spot bool `json:"spot,omitempty"` // StartingReplicaCount: Immutable. The number of machine replicas used at the // start of the batch operation. If not set, Vertex AI decides starting number, // not greater than max_replica_count StartingReplicaCount int64 `json:"startingReplicaCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineSpec") to + // ForceSendFields is a list of field names (e.g. "FlexStart") 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. "MachineSpec") to include in API + // NullFields is a list of field names (e.g. "FlexStart") 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. @@ -6641,15 +6636,33 @@ func (s GoogleCloudAiplatformV1beta1CreateDeploymentResourcePoolRequest) Marshal // GoogleCloudAiplatformV1beta1CreateEndpointOperationMetadata: Runtime // operation information for EndpointService.CreateEndpoint. type GoogleCloudAiplatformV1beta1CreateEndpointOperationMetadata struct { + // DeploymentStage: Output only. The deployment stage of the model. Only + // populated if this CreateEndpoint request deploys a model at the same time. + // + // Possible values: + // "DEPLOYMENT_STAGE_UNSPECIFIED" - Default value. This value is unused. + // "STARTING_DEPLOYMENT" - The deployment is initializing and setting up the + // environment. + // "PREPARING_MODEL" - The deployment is preparing the model assets. + // "CREATING_SERVING_CLUSTER" - The deployment is creating the underlying + // serving cluster. + // "ADDING_NODES_TO_CLUSTER" - The deployment is adding nodes to the serving + // cluster. + // "GETTING_CONTAINER_IMAGE" - The deployment is getting the container image + // for the model server. + // "STARTING_MODEL_SERVER" - The deployment is starting the model server. + // "FINISHING_UP" - The deployment is performing finalization steps. + // "DEPLOYMENT_TERMINATED" - The deployment has terminated. + DeploymentStage string `json:"deploymentStage,omitempty"` // GenericMetadata: The operation generic information. GenericMetadata *GoogleCloudAiplatformV1beta1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to + // ForceSendFields is a list of field names (e.g. "DeploymentStage") 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. "GenericMetadata") to include in + // NullFields is a list of field names (e.g. "DeploymentStage") 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. @@ -8448,15 +8461,32 @@ func (s GoogleCloudAiplatformV1beta1DeployIndexResponse) MarshalJSON() ([]byte, // GoogleCloudAiplatformV1beta1DeployModelOperationMetadata: Runtime operation // information for EndpointService.DeployModel. type GoogleCloudAiplatformV1beta1DeployModelOperationMetadata struct { + // DeploymentStage: Output only. The deployment stage of the model. + // + // Possible values: + // "DEPLOYMENT_STAGE_UNSPECIFIED" - Default value. This value is unused. + // "STARTING_DEPLOYMENT" - The deployment is initializing and setting up the + // environment. + // "PREPARING_MODEL" - The deployment is preparing the model assets. + // "CREATING_SERVING_CLUSTER" - The deployment is creating the underlying + // serving cluster. + // "ADDING_NODES_TO_CLUSTER" - The deployment is adding nodes to the serving + // cluster. + // "GETTING_CONTAINER_IMAGE" - The deployment is getting the container image + // for the model server. + // "STARTING_MODEL_SERVER" - The deployment is starting the model server. + // "FINISHING_UP" - The deployment is performing finalization steps. + // "DEPLOYMENT_TERMINATED" - The deployment has terminated. + DeploymentStage string `json:"deploymentStage,omitempty"` // GenericMetadata: The operation generic information. GenericMetadata *GoogleCloudAiplatformV1beta1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to + // ForceSendFields is a list of field names (e.g. "DeploymentStage") 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. "GenericMetadata") to include in + // NullFields is a list of field names (e.g. "DeploymentStage") 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. @@ -8802,6 +8832,13 @@ type GoogleCloudAiplatformV1beta1DeployedIndex struct { // [d, e] is disallowed. Note: we only support up to 5 deployment groups(not // including 'default'). DeploymentGroup string `json:"deploymentGroup,omitempty"` + // DeploymentTier: Optional. The deployment tier that the index is deployed to. + // DEPLOYMENT_TIER_UNSPECIFIED defaults to PERFORMANCE. + // + // Possible values: + // "DEPLOYMENT_TIER_UNSPECIFIED" - Default deployment tier. + // "STORAGE" - Optimized for costs. + DeploymentTier string `json:"deploymentTier,omitempty"` // DisplayName: The display name of the DeployedIndex. If not provided upon // creation, the Index's display_name is used. DisplayName string `json:"displayName,omitempty"` @@ -9714,6 +9751,25 @@ func (s GoogleCloudAiplatformV1beta1Endpoint) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1beta1EnterpriseWebSearch: Tool to search public web // data, powered by Vertex AI Search and Sec4 compliance. type GoogleCloudAiplatformV1beta1EnterpriseWebSearch struct { + // ExcludeDomains: Optional. List of domains to be excluded from the search + // results. The default limit is 2000 domains. + ExcludeDomains []string `json:"excludeDomains,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExcludeDomains") 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. "ExcludeDomains") 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 GoogleCloudAiplatformV1beta1EnterpriseWebSearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1EnterpriseWebSearch + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // GoogleCloudAiplatformV1beta1EntityIdSelector: Selector for entityId. Getting @@ -13808,6 +13864,9 @@ func (s GoogleCloudAiplatformV1beta1FeatureViewDirectWriteRequestDataKeyAndFeatu type GoogleCloudAiplatformV1beta1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeature struct { // Name: Feature short name. Name string `json:"name,omitempty"` + // Value: Feature value. A user provided timestamp may be set in the + // `FeatureValue.metadata.generate_time` field. + Value *GoogleCloudAiplatformV1beta1FeatureValue `json:"value,omitempty"` // ValueAndTimestamp: Feature value and timestamp. ValueAndTimestamp *GoogleCloudAiplatformV1beta1FeatureViewDirectWriteRequestDataKeyAndFeatureValuesFeatureFeatureValueAndTimestamp `json:"valueAndTimestamp,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to unconditionally @@ -15793,6 +15852,70 @@ func (s GoogleCloudAiplatformV1beta1GeminiExample) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1GeminiPreferenceExample: Input example for +// preference optimization. +type GoogleCloudAiplatformV1beta1GeminiPreferenceExample struct { + // Completions: List of completions for a given prompt. + Completions []*GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion `json:"completions,omitempty"` + // Contents: Multi-turn contents that represents the Prompt. + Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` + // ForceSendFields is a list of field names (e.g. "Completions") 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. "Completions") 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 GoogleCloudAiplatformV1beta1GeminiPreferenceExample) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GeminiPreferenceExample + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion: Completion +// and its preference score. +type GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion struct { + // Completion: Single turn completion for the given prompt. + Completion *GoogleCloudAiplatformV1beta1Content `json:"completion,omitempty"` + // Score: The score for the given completion. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Completion") 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. "Completion") 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 GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + // GoogleCloudAiplatformV1beta1GeminiRequestReadConfig: Configuration for how // to read Gemini requests from a multimodal dataset. type GoogleCloudAiplatformV1beta1GeminiRequestReadConfig struct { @@ -16152,6 +16275,11 @@ type GoogleCloudAiplatformV1beta1GenerateMemoriesRequest struct { // DirectContentsSource: Defines a direct source of content as the source // content from which to generate memories. DirectContentsSource *GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectContentsSource `json:"directContentsSource,omitempty"` + // DirectMemoriesSource: Defines a direct source of memories that should be + // uploaded to Memory Bank. This is similar to `CreateMemory`, but it allows + // for consolidation between these new memories and existing memories for the + // same scope. + DirectMemoriesSource *GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSource `json:"directMemoriesSource,omitempty"` // DisableConsolidation: Optional. If true, generated memories will not be // consolidated with existing memories; all generated memories will be added as // new memories regardless of whether they are duplicates of or contradictory @@ -16233,6 +16361,54 @@ func (s GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectContentsSourceE return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSource: +// Defines a direct source of memories that should be uploaded to Memory Bank +// with consolidation. +type GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSource struct { + // DirectMemories: Required. The direct memories to upload to Memory Bank. At + // most 5 direct memories are allowed per request. + DirectMemories []*GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSourceDirectMemory `json:"directMemories,omitempty"` + // ForceSendFields is a list of field names (e.g. "DirectMemories") 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. "DirectMemories") 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 GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSourceDirect +// Memory: A direct memory to upload to Memory Bank. +type GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSourceDirectMemory struct { + // Fact: Required. The fact to consolidate with existing memories. + Fact string `json:"fact,omitempty"` + // ForceSendFields is a list of field names (e.g. "Fact") 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. "Fact") 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 GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSourceDirectMemory) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateMemoriesRequestDirectMemoriesSourceDirectMemory + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1GenerateMemoriesRequestVertexSessionSource: // Defines an Agent Engine Session from which to generate the memories. If // `scope` is not provided, the scope will be extracted from the Session (i.e. @@ -16693,6 +16869,33 @@ func (s GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1GoogleMaps: Tool to retrieve public maps data +// for grounding, powered by Google. +type GoogleCloudAiplatformV1beta1GoogleMaps struct { + // ApiAuth: The authentication config to access the API. Deprecated. Please use + // auth_config instead. + ApiAuth *GoogleCloudAiplatformV1beta1ApiAuth `json:"apiAuth,omitempty"` + // AuthConfig: The authentication config to access the API. Only API key is + // supported. + AuthConfig *GoogleCloudAiplatformV1beta1AuthConfig `json:"authConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiAuth") 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. "ApiAuth") 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 GoogleCloudAiplatformV1beta1GoogleMaps) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GoogleMaps + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1GoogleSearchRetrieval: Tool to retrieve public // web data for grounding, powered by Google. type GoogleCloudAiplatformV1beta1GoogleSearchRetrieval struct { @@ -16835,26 +17038,148 @@ func (s GoogleCloudAiplatformV1beta1GroundednessSpec) MarshalJSON() ([]byte, err // GoogleCloudAiplatformV1beta1GroundingChunk: Grounding chunk. type GoogleCloudAiplatformV1beta1GroundingChunk struct { + // Maps: Grounding chunk from Google Maps. + Maps *GoogleCloudAiplatformV1beta1GroundingChunkMaps `json:"maps,omitempty"` // RetrievedContext: Grounding chunk from context retrieved by the retrieval // tools. RetrievedContext *GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext `json:"retrievedContext,omitempty"` // Web: Grounding chunk from the web. Web *GoogleCloudAiplatformV1beta1GroundingChunkWeb `json:"web,omitempty"` - // ForceSendFields is a list of field names (e.g. "RetrievedContext") to + // ForceSendFields is a list of field names (e.g. "Maps") 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. "Maps") 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 GoogleCloudAiplatformV1beta1GroundingChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingChunk + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingChunkMaps: Chunk from Google Maps. +type GoogleCloudAiplatformV1beta1GroundingChunkMaps struct { + // PlaceAnswerSources: Sources used to generate the place answer. This includes + // review snippets and photos that were used to generate the answer, as well as + // uris to flag content. + PlaceAnswerSources *GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSources `json:"placeAnswerSources,omitempty"` + // PlaceId: This Place's resource name, in `places/{place_id}` format. Can be + // used to look up the Place. + PlaceId string `json:"placeId,omitempty"` + // Text: Text of the chunk. + Text string `json:"text,omitempty"` + // Title: Title of the chunk. + Title string `json:"title,omitempty"` + // Uri: URI reference of the chunk. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "PlaceAnswerSources") 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. "RetrievedContext") to include in + // NullFields is a list of field names (e.g. "PlaceAnswerSources") 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 GoogleCloudAiplatformV1beta1GroundingChunkMaps) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingChunkMaps + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSources: Sources +// used to generate the place answer. +type GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSources struct { + // FlagContentUri: A link where users can flag a problem with the generated + // answer. + FlagContentUri string `json:"flagContentUri,omitempty"` + // ReviewSnippets: Snippets of reviews that are used to generate the answer. + ReviewSnippets []*GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet `json:"reviewSnippets,omitempty"` + // ForceSendFields is a list of field names (e.g. "FlagContentUri") 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. "FlagContentUri") 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 GoogleCloudAiplatformV1beta1GroundingChunk) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1GroundingChunk +func (s GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSources) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSources + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribu +// tion: Author attribution for a photo or review. +type GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution struct { + // DisplayName: Name of the author of the Photo or Review. + DisplayName string `json:"displayName,omitempty"` + // PhotoUri: Profile photo URI of the author of the Photo or Review. + PhotoUri string `json:"photoUri,omitempty"` + // Uri: URI of the author of the Photo or Review. + Uri string `json:"uri,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 GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet +// : Encapsulates a review snippet. +type GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet struct { + // AuthorAttribution: This review's author. + AuthorAttribution *GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution `json:"authorAttribution,omitempty"` + // FlagContentUri: A link where users can flag a problem with the review. + FlagContentUri string `json:"flagContentUri,omitempty"` + // GoogleMapsUri: A link to show the review on Google Maps. + GoogleMapsUri string `json:"googleMapsUri,omitempty"` + // RelativePublishTimeDescription: A string of formatted recent time, + // expressing the review time relative to the current time in a form + // appropriate for the language and country. + RelativePublishTimeDescription string `json:"relativePublishTimeDescription,omitempty"` + // Review: A reference representing this place review which may be used to look + // up this place review again. + Review string `json:"review,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthorAttribution") 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. "AuthorAttribution") 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 GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingChunkMapsPlaceAnswerSourcesReviewSnippet return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -16917,6 +17242,11 @@ func (s GoogleCloudAiplatformV1beta1GroundingChunkWeb) MarshalJSON() ([]byte, er // GoogleCloudAiplatformV1beta1GroundingMetadata: Metadata returned to client // when grounding is enabled. type GoogleCloudAiplatformV1beta1GroundingMetadata struct { + // GoogleMapsWidgetContextToken: Optional. Output only. Resource name of the + // Google Maps widget context token to be used with the PlacesContextElement + // widget to render contextual data. This is populated only for Google Maps + // grounding. + GoogleMapsWidgetContextToken string `json:"googleMapsWidgetContextToken,omitempty"` // GroundingChunks: List of supporting references retrieved from specified // grounding source. GroundingChunks []*GoogleCloudAiplatformV1beta1GroundingChunk `json:"groundingChunks,omitempty"` @@ -16932,15 +17262,15 @@ type GoogleCloudAiplatformV1beta1GroundingMetadata struct { // WebSearchQueries: Optional. Web search queries for the following-up web // search. WebSearchQueries []string `json:"webSearchQueries,omitempty"` - // ForceSendFields is a list of field names (e.g. "GroundingChunks") 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 is a list of field names (e.g. + // "GoogleMapsWidgetContextToken") 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. "GroundingChunks") 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. "GoogleMapsWidgetContextToken") 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:"-"` } @@ -17798,6 +18128,9 @@ type GoogleCloudAiplatformV1beta1IndexDatapoint struct { CrowdingTag *GoogleCloudAiplatformV1beta1IndexDatapointCrowdingTag `json:"crowdingTag,omitempty"` // DatapointId: Required. Unique identifier of the datapoint. DatapointId string `json:"datapointId,omitempty"` + // EmbeddingMetadata: Optional. The key-value map of additional metadata for + // the datapoint. + EmbeddingMetadata googleapi.RawMessage `json:"embeddingMetadata,omitempty"` // FeatureVector: Required. Feature embedding vector for dense index. An array // of numbers with the length of [NearestNeighborSearchConfig.dimensions]. FeatureVector []float64 `json:"featureVector,omitempty"` @@ -20465,6 +20798,7 @@ type GoogleCloudAiplatformV1beta1MachineSpec struct { // "NVIDIA_H100_MEGA_80GB" - Nvidia H100 Mega 80Gb GPU. // "NVIDIA_H200_141GB" - Nvidia H200 141Gb GPU. // "NVIDIA_B200" - Nvidia B200 GPU. + // "NVIDIA_GB200" - Nvidia GB200 GPU. // "TPU_V2" - TPU v2. // "TPU_V3" - TPU v3. // "TPU_V4_POD" - TPU v4. @@ -25782,6 +26116,55 @@ func (s GoogleCloudAiplatformV1beta1NotebookSoftwareConfig) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1OptimizePromptRequest: Request message for +// GenAiTuningService.OptimizePrompt. +type GoogleCloudAiplatformV1beta1OptimizePromptRequest struct { + // Content: Required. The content to optimize. + Content *GoogleCloudAiplatformV1beta1Content `json:"content,omitempty"` + // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 GoogleCloudAiplatformV1beta1OptimizePromptRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1OptimizePromptRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1OptimizePromptResponse: Response message for +// GenAiTuningService.OptimizePrompt +type GoogleCloudAiplatformV1beta1OptimizePromptResponse struct { + // Content: Output only. The optimized prompt content. + Content *GoogleCloudAiplatformV1beta1Content `json:"content,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 GoogleCloudAiplatformV1beta1OptimizePromptResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1OptimizePromptResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1OutputConfig: Config for evaluation output. type GoogleCloudAiplatformV1beta1OutputConfig struct { // GcsDestination: Cloud storage destination for evaluation output. @@ -27306,6 +27689,40 @@ func (s GoogleCloudAiplatformV1beta1PostStartupScriptConfig) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PreTunedModel: A pre-tuned model for continuous +// tuning. +type GoogleCloudAiplatformV1beta1PreTunedModel struct { + // BaseModel: Output only. The name of the base model this PreTunedModel was + // tuned from. + BaseModel string `json:"baseModel,omitempty"` + // CheckpointId: Optional. The source checkpoint id. If not specified, the + // default checkpoint will be used. + CheckpointId string `json:"checkpointId,omitempty"` + // TunedModelName: The resource name of the Model. E.g., a model resource name + // with a specified version id or alias: + // `projects/{project}/locations/{location}/models/{model}@{version_id}` + // `projects/{project}/locations/{location}/models/{model}@{alias}` Or, omit + // the version id to use the default version: + // `projects/{project}/locations/{location}/models/{model}` + TunedModelName string `json:"tunedModelName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BaseModel") 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. "BaseModel") 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 GoogleCloudAiplatformV1beta1PreTunedModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PreTunedModel + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig: The configuration for the // prebuilt speaker to use. type GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig struct { @@ -27604,6 +28021,138 @@ func (s GoogleCloudAiplatformV1beta1PredictSchemata) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PreferenceOptimizationDataStats: Statistics +// computed for datasets used for preference optimization. +type GoogleCloudAiplatformV1beta1PreferenceOptimizationDataStats struct { + // ScoreVariancePerExampleDistribution: Output only. Dataset distributions for + // scores variance per example. + ScoreVariancePerExampleDistribution *GoogleCloudAiplatformV1beta1DatasetDistribution `json:"scoreVariancePerExampleDistribution,omitempty"` + // ScoresDistribution: Output only. Dataset distributions for scores. + ScoresDistribution *GoogleCloudAiplatformV1beta1DatasetDistribution `json:"scoresDistribution,omitempty"` + // TotalBillableTokenCount: Output only. Number of billable tokens in the + // tuning dataset. + TotalBillableTokenCount int64 `json:"totalBillableTokenCount,omitempty,string"` + // TuningDatasetExampleCount: Output only. Number of examples in the tuning + // dataset. + TuningDatasetExampleCount int64 `json:"tuningDatasetExampleCount,omitempty,string"` + // TuningStepCount: Output only. Number of tuning steps for this Tuning Job. + TuningStepCount int64 `json:"tuningStepCount,omitempty,string"` + // UserDatasetExamples: Output only. Sample user examples in the training + // dataset. + UserDatasetExamples []*GoogleCloudAiplatformV1beta1GeminiPreferenceExample `json:"userDatasetExamples,omitempty"` + // UserInputTokenDistribution: Output only. Dataset distributions for the user + // input tokens. + UserInputTokenDistribution *GoogleCloudAiplatformV1beta1DatasetDistribution `json:"userInputTokenDistribution,omitempty"` + // UserOutputTokenDistribution: Output only. Dataset distributions for the user + // output tokens. + UserOutputTokenDistribution *GoogleCloudAiplatformV1beta1DatasetDistribution `json:"userOutputTokenDistribution,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ScoreVariancePerExampleDistribution") 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. + // "ScoreVariancePerExampleDistribution") 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 GoogleCloudAiplatformV1beta1PreferenceOptimizationDataStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PreferenceOptimizationDataStats + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters: +// Hyperparameters for Preference Optimization. +type GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters struct { + // AdapterSize: Optional. Adapter size for preference optimization. + // + // Possible values: + // "ADAPTER_SIZE_UNSPECIFIED" - Adapter size is unspecified. + // "ADAPTER_SIZE_ONE" - Adapter size 1. + // "ADAPTER_SIZE_TWO" - Adapter size 2. + // "ADAPTER_SIZE_FOUR" - Adapter size 4. + // "ADAPTER_SIZE_EIGHT" - Adapter size 8. + // "ADAPTER_SIZE_SIXTEEN" - Adapter size 16. + // "ADAPTER_SIZE_THIRTY_TWO" - Adapter size 32. + AdapterSize string `json:"adapterSize,omitempty"` + // Beta: Optional. Weight for KL Divergence regularization. + Beta float64 `json:"beta,omitempty"` + // EpochCount: Optional. Number of complete passes the model makes over the + // entire training dataset during training. + EpochCount int64 `json:"epochCount,omitempty,string"` + // LearningRateMultiplier: Optional. Multiplier for adjusting the default + // learning rate. + LearningRateMultiplier float64 `json:"learningRateMultiplier,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdapterSize") 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. "AdapterSize") 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 GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters + var s1 struct { + Beta gensupport.JSONFloat64 `json:"beta"` + LearningRateMultiplier gensupport.JSONFloat64 `json:"learningRateMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Beta = float64(s1.Beta) + s.LearningRateMultiplier = float64(s1.LearningRateMultiplier) + return nil +} + +// GoogleCloudAiplatformV1beta1PreferenceOptimizationSpec: Tuning Spec for +// Preference Optimization. +type GoogleCloudAiplatformV1beta1PreferenceOptimizationSpec struct { + // HyperParameters: Optional. Hyperparameters for Preference Optimization. + HyperParameters *GoogleCloudAiplatformV1beta1PreferenceOptimizationHyperParameters `json:"hyperParameters,omitempty"` + // TrainingDatasetUri: Required. Cloud Storage path to file containing training + // dataset for preference optimization tuning. The dataset must be formatted as + // a JSONL file. + TrainingDatasetUri string `json:"trainingDatasetUri,omitempty"` + // ValidationDatasetUri: Optional. Cloud Storage path to file containing + // validation dataset for preference optimization tuning. The dataset must be + // formatted as a JSONL file. + ValidationDatasetUri string `json:"validationDatasetUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "HyperParameters") 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. "HyperParameters") 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 GoogleCloudAiplatformV1beta1PreferenceOptimizationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PreferenceOptimizationSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Presets: Preset configuration for example-based // explanations type GoogleCloudAiplatformV1beta1Presets struct { @@ -28290,6 +28839,10 @@ func (s GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenNotebooks) Mar // ces: The regional resource name or the URI. Key is region, e.g., // us-central1, europe-west2, global, etc.. type GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences struct { + // ColabNotebookDisabled: Optional. For notebook resource. When set to true, + // the Colab Enterprise link will be disabled in the "open notebook" dialog in + // UI. + ColabNotebookDisabled bool `json:"colabNotebookDisabled,omitempty"` // References: Required. References map[string]GoogleCloudAiplatformV1beta1PublisherModelResourceReference `json:"references,omitempty"` // ResourceDescription: Optional. Description of the resource. @@ -28303,15 +28856,15 @@ type GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceRefer SupportsWorkbench bool `json:"supportsWorkbench,omitempty"` // Title: Required. Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "References") to + // ForceSendFields is a list of field names (e.g. "ColabNotebookDisabled") 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. "References") 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. "ColabNotebookDisabled") 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:"-"` } @@ -31219,6 +31772,10 @@ type GoogleCloudAiplatformV1beta1ReasoningEngine struct { Description string `json:"description,omitempty"` // DisplayName: Required. The display name of the ReasoningEngine. DisplayName string `json:"displayName,omitempty"` + // EncryptionSpec: Customer-managed encryption key spec for a ReasoningEngine. + // If set, this ReasoningEngine and all sub-resources of this ReasoningEngine + // will be secured by this key. + EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` // Etag: Optional. Used to perform consistent read-modify-write updates. If not // set, a blind "overwrite" update happens. Etag string `json:"etag,omitempty"` @@ -31371,6 +31928,12 @@ type GoogleCloudAiplatformV1beta1ReasoningEngineSpec struct { // `deployment_spec.first_party_image_override`, but keeping the field_behavior // to avoid introducing breaking changes. PackageSpec *GoogleCloudAiplatformV1beta1ReasoningEngineSpecPackageSpec `json:"packageSpec,omitempty"` + // ServiceAccount: Optional. The service account that the Reasoning Engine + // artifact runs as. It should have "roles/storage.objectViewer" for reading + // the user project's Cloud Storage and "roles/aiplatform.user" for using + // Vertex extensions. If not specified, the Vertex AI Reasoning Engine Service + // Agent in the project will be used. + ServiceAccount string `json:"serviceAccount,omitempty"` // ForceSendFields is a list of field names (e.g. "AgentFramework") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -43350,9 +43913,16 @@ type GoogleCloudAiplatformV1beta1SupervisedHyperParameters struct { // "ADAPTER_SIZE_SIXTEEN" - Adapter size 16. // "ADAPTER_SIZE_THIRTY_TWO" - Adapter size 32. AdapterSize string `json:"adapterSize,omitempty"` + // BatchSize: Optional. Batch size for tuning. This feature is only available + // for open source models. + BatchSize int64 `json:"batchSize,omitempty,string"` // EpochCount: Optional. Number of complete passes the model makes over the // entire training dataset during training. EpochCount int64 `json:"epochCount,omitempty,string"` + // LearningRate: Optional. Learning rate for tuning. Mutually exclusive with + // `learning_rate_multiplier`. This feature is only available for open source + // models. + LearningRate float64 `json:"learningRate,omitempty"` // LearningRateMultiplier: Optional. Multiplier for adjusting the default // learning rate. Mutually exclusive with `learning_rate`. This feature is only // available for 1P models. @@ -43378,6 +43948,7 @@ func (s GoogleCloudAiplatformV1beta1SupervisedHyperParameters) MarshalJSON() ([] func (s *GoogleCloudAiplatformV1beta1SupervisedHyperParameters) UnmarshalJSON(data []byte) error { type NoMethod GoogleCloudAiplatformV1beta1SupervisedHyperParameters var s1 struct { + LearningRate gensupport.JSONFloat64 `json:"learningRate"` LearningRateMultiplier gensupport.JSONFloat64 `json:"learningRateMultiplier"` *NoMethod } @@ -43385,6 +43956,7 @@ func (s *GoogleCloudAiplatformV1beta1SupervisedHyperParameters) UnmarshalJSON(da if err := json.Unmarshal(data, &s1); err != nil { return err } + s.LearningRate = float64(s1.LearningRate) s.LearningRateMultiplier = float64(s1.LearningRateMultiplier) return nil } @@ -43573,6 +44145,13 @@ type GoogleCloudAiplatformV1beta1SupervisedTuningSpec struct { // can be specified as either a Cloud Storage path to a JSONL file or as the // resource name of a Vertex Multimodal Dataset. TrainingDatasetUri string `json:"trainingDatasetUri,omitempty"` + // TuningMode: Tuning mode. + // + // Possible values: + // "TUNING_MODE_UNSPECIFIED" - Tuning mode is unspecified. + // "TUNING_MODE_FULL" - Full fine-tuning mode. + // "TUNING_MODE_PEFT_ADAPTER" - PEFT adapter tuning mode. + TuningMode string `json:"tuningMode,omitempty"` // ValidationDatasetUri: Optional. Validation dataset used for tuning. The // dataset can be specified as either a Cloud Storage path to a JSONL file or // as the resource name of a Vertex Multimodal Dataset. @@ -44300,10 +44879,6 @@ type GoogleCloudAiplatformV1beta1Tool struct { // CodeExecution: Optional. CodeExecution tool type. Enables the model to // execute code as part of generation. CodeExecution *GoogleCloudAiplatformV1beta1ToolCodeExecution `json:"codeExecution,omitempty"` - // ComputerUse: Optional. Tool to support the model interacting directly with - // the computer. If enabled, it automatically populates computer-use specific - // Function Declarations. - ComputerUse *GoogleCloudAiplatformV1beta1ToolComputerUse `json:"computerUse,omitempty"` // EnterpriseWebSearch: Optional. Tool to support searching public web data, // powered by Vertex AI Search and Sec4 compliance. EnterpriseWebSearch *GoogleCloudAiplatformV1beta1EnterpriseWebSearch `json:"enterpriseWebSearch,omitempty"` @@ -44312,9 +44887,12 @@ type GoogleCloudAiplatformV1beta1Tool struct { // Model may decide to call a subset of these functions by populating // FunctionCall in the response. User should provide a FunctionResponse for // each function call in the next turn. Based on the function responses, Model - // will generate the final response back to the user. Maximum 128 function + // will generate the final response back to the user. Maximum 512 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleMaps: Optional. GoogleMaps tool type. Tool to support Google Maps in + // Model. + GoogleMaps *GoogleCloudAiplatformV1beta1GoogleMaps `json:"googleMaps,omitempty"` // GoogleSearch: Optional. GoogleSearch tool type. Tool to support Google // Search in Model. Powered by Google. GoogleSearch *GoogleCloudAiplatformV1beta1ToolGoogleSearch `json:"googleSearch,omitempty"` @@ -44491,32 +45069,6 @@ type GoogleCloudAiplatformV1beta1ToolCallValidSpec struct { type GoogleCloudAiplatformV1beta1ToolCodeExecution struct { } -// GoogleCloudAiplatformV1beta1ToolComputerUse: Tool to support computer use. -type GoogleCloudAiplatformV1beta1ToolComputerUse struct { - // Environment: Required. The environment being operated. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Defaults to browser. - // "ENVIRONMENT_BROWSER" - Operates in a web browser. - Environment string `json:"environment,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environment") 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. "Environment") 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 GoogleCloudAiplatformV1beta1ToolComputerUse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ToolComputerUse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1ToolConfig: Tool config. This config is shared // for all tools provided in the request. type GoogleCloudAiplatformV1beta1ToolConfig struct { @@ -44545,6 +45097,26 @@ func (s GoogleCloudAiplatformV1beta1ToolConfig) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1beta1ToolGoogleSearch: GoogleSearch tool type. Tool // to support Google Search in Model. Powered by Google. type GoogleCloudAiplatformV1beta1ToolGoogleSearch struct { + // ExcludeDomains: Optional. List of domains to be excluded from the search + // results. The default limit is 2000 domains. Example: ["amazon.com", + // "facebook.com"]. + ExcludeDomains []string `json:"excludeDomains,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExcludeDomains") 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. "ExcludeDomains") 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 GoogleCloudAiplatformV1beta1ToolGoogleSearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ToolGoogleSearch + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // GoogleCloudAiplatformV1beta1ToolNameMatchInput: Input for tool name match @@ -46117,6 +46689,9 @@ func (s GoogleCloudAiplatformV1beta1TunedModelRef) MarshalJSON() ([]byte, error) type GoogleCloudAiplatformV1beta1TuningDataStats struct { // DistillationDataStats: Output only. Statistics for distillation. DistillationDataStats *GoogleCloudAiplatformV1beta1DistillationDataStats `json:"distillationDataStats,omitempty"` + // PreferenceOptimizationDataStats: Output only. Statistics for preference + // optimization. + PreferenceOptimizationDataStats *GoogleCloudAiplatformV1beta1PreferenceOptimizationDataStats `json:"preferenceOptimizationDataStats,omitempty"` // SupervisedTuningDataStats: The SFT Tuning data stats. SupervisedTuningDataStats *GoogleCloudAiplatformV1beta1SupervisedTuningDataStats `json:"supervisedTuningDataStats,omitempty"` // ForceSendFields is a list of field names (e.g. "DistillationDataStats") to @@ -46145,6 +46720,13 @@ type GoogleCloudAiplatformV1beta1TuningJob struct { BaseModel string `json:"baseModel,omitempty"` // CreateTime: Output only. Time when the TuningJob was created. CreateTime string `json:"createTime,omitempty"` + // CustomBaseModel: Optional. The user-provided path to custom model weights. + // Set this field to tune a custom model. The path must be a Cloud Storage + // directory that contains the model weights in .safetensors format along with + // associated model metadata files. If this field is set, the base_model field + // must still be set to indicate which base model the custom model is derived + // from. This feature is only available for open source models. + CustomBaseModel string `json:"customBaseModel,omitempty"` // Description: Optional. The description of the TuningJob. Description string `json:"description,omitempty"` // DistillationSpec: Tuning Spec for Distillation. @@ -46172,6 +46754,10 @@ type GoogleCloudAiplatformV1beta1TuningJob struct { // Name: Output only. Identifier. Resource name of a TuningJob. Format: // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` Name string `json:"name,omitempty"` + // OutputUri: Optional. Cloud Storage path to the directory where tuning job + // outputs are written to. This field is only available and required for open + // source models. + OutputUri string `json:"outputUri,omitempty"` // PartnerModelTuningSpec: Tuning Spec for open sourced and third party Partner // models. PartnerModelTuningSpec *GoogleCloudAiplatformV1beta1PartnerModelTuningSpec `json:"partnerModelTuningSpec,omitempty"` @@ -46179,6 +46765,10 @@ type GoogleCloudAiplatformV1beta1TuningJob struct { // with the TuningJob. Format: // `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. PipelineJob string `json:"pipelineJob,omitempty"` + // PreTunedModel: The pre-tuned model for continuous tuning. + PreTunedModel *GoogleCloudAiplatformV1beta1PreTunedModel `json:"preTunedModel,omitempty"` + // PreferenceOptimizationSpec: Tuning Spec for Preference Optimization. + PreferenceOptimizationSpec *GoogleCloudAiplatformV1beta1PreferenceOptimizationSpec `json:"preferenceOptimizationSpec,omitempty"` // SatisfiesPzi: Output only. Reserved for future use. SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` // SatisfiesPzs: Output only. Reserved for future use. @@ -46229,6 +46819,8 @@ type GoogleCloudAiplatformV1beta1TuningJob struct { TuningDataStats *GoogleCloudAiplatformV1beta1TuningDataStats `json:"tuningDataStats,omitempty"` // UpdateTime: Output only. Time when the TuningJob was most recently updated. UpdateTime string `json:"updateTime,omitempty"` + // VeoTuningSpec: Tuning Spec for Veo Tuning. + VeoTuningSpec *GoogleCloudAiplatformV1beta1VeoTuningSpec `json:"veoTuningSpec,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -47233,6 +47825,83 @@ func (s *GoogleCloudAiplatformV1beta1Value) UnmarshalJSON(data []byte) error { return nil } +// GoogleCloudAiplatformV1beta1VeoHyperParameters: Hyperparameters for Veo. +type GoogleCloudAiplatformV1beta1VeoHyperParameters struct { + // EpochCount: Optional. Number of complete passes the model makes over the + // entire training dataset during training. + EpochCount int64 `json:"epochCount,omitempty,string"` + // LearningRateMultiplier: Optional. Multiplier for adjusting the default + // learning rate. + LearningRateMultiplier float64 `json:"learningRateMultiplier,omitempty"` + // TuningTask: Optional. The tuning task. Either I2V or T2V. + // + // Possible values: + // "TUNING_TASK_UNSPECIFIED" - Default value. This value is unused. + // "TUNING_TASK_I2V" - Tuning task for image to video. + // "TUNING_TASK_T2V" - Tuning task for text to video. + TuningTask string `json:"tuningTask,omitempty"` + // ForceSendFields is a list of field names (e.g. "EpochCount") 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. "EpochCount") 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 GoogleCloudAiplatformV1beta1VeoHyperParameters) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VeoHyperParameters + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1VeoHyperParameters) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1VeoHyperParameters + var s1 struct { + LearningRateMultiplier gensupport.JSONFloat64 `json:"learningRateMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.LearningRateMultiplier = float64(s1.LearningRateMultiplier) + return nil +} + +// GoogleCloudAiplatformV1beta1VeoTuningSpec: Tuning Spec for Veo Model Tuning. +type GoogleCloudAiplatformV1beta1VeoTuningSpec struct { + // HyperParameters: Optional. Hyperparameters for Veo. + HyperParameters *GoogleCloudAiplatformV1beta1VeoHyperParameters `json:"hyperParameters,omitempty"` + // TrainingDatasetUri: Required. Training dataset used for tuning. The dataset + // can be specified as either a Cloud Storage path to a JSONL file or as the + // resource name of a Vertex Multimodal Dataset. + TrainingDatasetUri string `json:"trainingDatasetUri,omitempty"` + // ValidationDatasetUri: Optional. Validation dataset used for tuning. The + // dataset can be specified as either a Cloud Storage path to a JSONL file or + // as the resource name of a Vertex Multimodal Dataset. + ValidationDatasetUri string `json:"validationDatasetUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "HyperParameters") 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. "HyperParameters") 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 GoogleCloudAiplatformV1beta1VeoTuningSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VeoTuningSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1VertexAISearch: Retrieve from Vertex AI Search // datastore or engine for grounding. datastore and engine are mutually // exclusive. See https://cloud.google.com/products/agent-builder @@ -47423,6 +48092,9 @@ func (s GoogleCloudAiplatformV1beta1VertexRagStoreRagResource) MarshalJSON() ([] type GoogleCloudAiplatformV1beta1VideoMetadata struct { // EndOffset: Optional. The end offset of the video. EndOffset string `json:"endOffset,omitempty"` + // Fps: Optional. The frame rate of the video sent to the model. If not + // specified, the default value will be 1.0. The fps range is (0.0, 24.0]. + Fps float64 `json:"fps,omitempty"` // StartOffset: Optional. The start offset of the video. StartOffset string `json:"startOffset,omitempty"` // ForceSendFields is a list of field names (e.g. "EndOffset") to @@ -47443,6 +48115,20 @@ func (s GoogleCloudAiplatformV1beta1VideoMetadata) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudAiplatformV1beta1VideoMetadata) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1VideoMetadata + var s1 struct { + Fps gensupport.JSONFloat64 `json:"fps"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Fps = float64(s1.Fps) + return nil +} + // GoogleCloudAiplatformV1beta1VoiceConfig: The configuration for the voice to // use. type GoogleCloudAiplatformV1beta1VoiceConfig struct { @@ -137973,6 +138659,111 @@ func (c *ProjectsLocationsTuningJobsListCall) Pages(ctx context.Context, f func( } } +type ProjectsLocationsTuningJobsOptimizePromptCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1optimizepromptrequest *GoogleCloudAiplatformV1beta1OptimizePromptRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// OptimizePrompt: Optimizes a prompt. +// +// - parent: The resource name of the Location to optimize the prompt in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsTuningJobsService) OptimizePrompt(parent string, googlecloudaiplatformv1beta1optimizepromptrequest *GoogleCloudAiplatformV1beta1OptimizePromptRequest) *ProjectsLocationsTuningJobsOptimizePromptCall { + c := &ProjectsLocationsTuningJobsOptimizePromptCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1optimizepromptrequest = googlecloudaiplatformv1beta1optimizepromptrequest + 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 *ProjectsLocationsTuningJobsOptimizePromptCall) Fields(s ...googleapi.Field) *ProjectsLocationsTuningJobsOptimizePromptCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsTuningJobsOptimizePromptCall) Context(ctx context.Context) *ProjectsLocationsTuningJobsOptimizePromptCall { + 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 *ProjectsLocationsTuningJobsOptimizePromptCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTuningJobsOptimizePromptCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudaiplatformv1beta1optimizepromptrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tuningJobs:optimizePrompt") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "aiplatform.projects.locations.tuningJobs.optimizePrompt", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.tuningJobs.optimizePrompt" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1OptimizePromptResponse.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 *ProjectsLocationsTuningJobsOptimizePromptCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1OptimizePromptResponse, 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 := &GoogleCloudAiplatformV1beta1OptimizePromptResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "aiplatform.projects.locations.tuningJobs.optimizePrompt", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsTuningJobsRebaseTunedModelCall struct { s *Service parent string diff --git a/apihub/v1/apihub-api.json b/apihub/v1/apihub-api.json index f7fdd167c8..3057e66c2c 100644 --- a/apihub/v1/apihub-api.json +++ b/apihub/v1/apihub-api.json @@ -1701,7 +1701,7 @@ ], "parameters": { "filter": { - "description": "Optional. An expression that filters the list of Deployments. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string. The comparison operator must be one of: `\u003c`, `\u003e` or `=`. Filters are not case sensitive. The following fields in the `Deployments` are eligible for filtering: * `display_name` - The display name of the Deployment. Allowed comparison operators: `=`. * `create_time` - The time at which the Deployment was created. The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: `\u003e` and `\u003c`. * `resource_uri` - A URI to the deployment resource. Allowed comparison operators: `=`. * `api_versions` - The API versions linked to this deployment. Allowed comparison operators: `:`. * `deployment_type.enum_values.values.id` - The allowed value id of the deployment_type attribute associated with the Deployment. Allowed comparison operators: `:`. * `deployment_type.enum_values.values.display_name` - The allowed value display name of the deployment_type attribute associated with the Deployment. Allowed comparison operators: `:`. * `slo.string_values.values` -The allowed string value of the slo attribute associated with the deployment. Allowed comparison operators: `:`. * `environment.enum_values.values.id` - The allowed value id of the environment attribute associated with the deployment. Allowed comparison operators: `:`. * `environment.enum_values.values.display_name` - The allowed value display name of the environment attribute associated with the deployment. Allowed comparison operators: `:`. * `attributes.projects/test-project-id/locations/test-location-id/ attributes/user-defined-attribute-id.enum_values.values.id` - The allowed value id of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a placeholder that can be replaced with any user defined enum attribute name. * `attributes.projects/test-project-id/locations/test-location-id/ attributes/user-defined-attribute-id.enum_values.values.display_name` - The allowed value display name of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-display-name is a placeholder that can be replaced with any user defined enum attribute enum name. * `attributes.projects/test-project-id/locations/test-location-id/ attributes/user-defined-attribute-id.string_values.values` - The allowed value of the user defined string attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-string is a placeholder that can be replaced with any user defined string attribute name. * `attributes.projects/test-project-id/locations/test-location-id/ attributes/user-defined-attribute-id.json_values.values` - The allowed value of the user defined JSON attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-json is a placeholder that can be replaced with any user defined JSON attribute name. A filter function is also supported in the filter string. The filter function is `id(name)`. The `id(name)` function returns the id of the resource name. For example, `id(name) = \\\"deployment-1\\\"` is equivalent to `name = \\\"projects/test-project-id/locations/test-location-id/deployments/deployment-1\\\"` provided the parent is `projects/test-project-id/locations/test-location-id`. Expressions are combined with either `AND` logic operator or `OR` logical operator but not both of them together i.e. only one of the `AND` or `OR` operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that then `INVALID_ARGUMENT` error is returned by the API. Here are a few examples: * `environment.enum_values.values.id: staging-id` - The allowed value id of the environment attribute associated with the Deployment is _staging-id_. * `environment.enum_values.values.display_name: \\\"Staging Deployment\\\"` - The allowed value display name of the environment attribute associated with the Deployment is `Staging Deployment`. * `environment.enum_values.values.id: production-id AND create_time \u003c \\\"2021-08-15T14:50:00Z\\\" AND create_time \u003e \\\"2021-08-10T12:00:00Z\\\"` - The allowed value id of the environment attribute associated with the Deployment is _production-id_ and Deployment was created before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 UTC_. * `environment.enum_values.values.id: production-id OR slo.string_values.values: \\\"99.99%\\\"` - The allowed value id of the environment attribute Deployment is _production-id_ or string value of the slo attribute is _99.99%_. * `environment.enum_values.values.id: staging-id AND attributes.projects/test-project-id/locations/test-location-id/ attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values: test` - The filter string specifies that the allowed value id of the environment attribute associated with the Deployment is _staging-id_ and the value of the user defined attribute of type string is _test_.", + "description": "Optional. An expression that filters the list of Deployments. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string. The comparison operator must be one of: `\u003c`, `\u003e` or `=`. Filters are not case sensitive. The following fields in the `Deployments` are eligible for filtering: * `display_name` - The display name of the Deployment. Allowed comparison operators: `=`. * `create_time` - The time at which the Deployment was created. The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: `\u003e` and `\u003c`. * `resource_uri` - A URI to the deployment resource. Allowed comparison operators: `=`. * `api_versions` - The API versions linked to this deployment. Allowed comparison operators: `:`. * `source_project` - The project/organization at source for the deployment. Allowed comparison operators: `=`. * `source_environment` - The environment at source for the deployment. Allowed comparison operators: `=`. * `deployment_type.enum_values.values.id` - The allowed value id of the deployment_type attribute associated with the Deployment. Allowed comparison operators: `:`. * `deployment_type.enum_values.values.display_name` - The allowed value display name of the deployment_type attribute associated with the Deployment. Allowed comparison operators: `:`. * `slo.string_values.values` -The allowed string value of the slo attribute associated with the deployment. Allowed comparison operators: `:`. * `environment.enum_values.values.id` - The allowed value id of the environment attribute associated with the deployment. Allowed comparison operators: `:`. * `environment.enum_values.values.display_name` - The allowed value display name of the environment attribute associated with the deployment. Allowed comparison operators: `:`. * `attributes.projects/test-project-id/locations/test-location-id/ attributes/user-defined-attribute-id.enum_values.values.id` - The allowed value id of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a placeholder that can be replaced with any user defined enum attribute name. * `attributes.projects/test-project-id/locations/test-location-id/ attributes/user-defined-attribute-id.enum_values.values.display_name` - The allowed value display name of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-display-name is a placeholder that can be replaced with any user defined enum attribute enum name. * `attributes.projects/test-project-id/locations/test-location-id/ attributes/user-defined-attribute-id.string_values.values` - The allowed value of the user defined string attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-string is a placeholder that can be replaced with any user defined string attribute name. * `attributes.projects/test-project-id/locations/test-location-id/ attributes/user-defined-attribute-id.json_values.values` - The allowed value of the user defined JSON attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-json is a placeholder that can be replaced with any user defined JSON attribute name. A filter function is also supported in the filter string. The filter function is `id(name)`. The `id(name)` function returns the id of the resource name. For example, `id(name) = \\\"deployment-1\\\"` is equivalent to `name = \\\"projects/test-project-id/locations/test-location-id/deployments/deployment-1\\\"` provided the parent is `projects/test-project-id/locations/test-location-id`. Expressions are combined with either `AND` logic operator or `OR` logical operator but not both of them together i.e. only one of the `AND` or `OR` operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that then `INVALID_ARGUMENT` error is returned by the API. Here are a few examples: * `environment.enum_values.values.id: staging-id` - The allowed value id of the environment attribute associated with the Deployment is _staging-id_. * `environment.enum_values.values.display_name: \\\"Staging Deployment\\\"` - The allowed value display name of the environment attribute associated with the Deployment is `Staging Deployment`. * `environment.enum_values.values.id: production-id AND create_time \u003c \\\"2021-08-15T14:50:00Z\\\" AND create_time \u003e \\\"2021-08-10T12:00:00Z\\\"` - The allowed value id of the environment attribute associated with the Deployment is _production-id_ and Deployment was created before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 UTC_. * `environment.enum_values.values.id: production-id OR slo.string_values.values: \\\"99.99%\\\"` - The allowed value id of the environment attribute Deployment is _production-id_ or string value of the slo attribute is _99.99%_. * `environment.enum_values.values.id: staging-id AND attributes.projects/test-project-id/locations/test-location-id/ attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values: test` - The filter string specifies that the allowed value id of the environment attribute associated with the Deployment is _staging-id_ and the value of the user defined attribute of type string is _test_.", "location": "query", "type": "string" }, @@ -1768,6 +1768,138 @@ } } }, + "discoveredApiObservations": { + "methods": { + "get": { + "description": "Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredApiObservations/{discoveredApiObservationsId}", + "httpMethod": "GET", + "id": "apihub.projects.locations.discoveredApiObservations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DiscoveredApiObservation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveredApiObservations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApihubV1DiscoveredApiObservation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the DiscoveredAPIObservations in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredApiObservations", + "httpMethod": "GET", + "id": "apihub.projects.locations.discoveredApiObservations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of ApiObservations to return. The service may return fewer than this value. If unspecified, at most 10 ApiObservations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListApiObservations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListApiObservations` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of ApiObservations. Format: projects/{project}/locations/{location}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/discoveredApiObservations", + "response": { + "$ref": "GoogleCloudApihubV1ListDiscoveredApiObservationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "discoveredApiOperations": { + "methods": { + "get": { + "description": "Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredApiObservations/{discoveredApiObservationsId}/discoveredApiOperations/{discoveredApiOperationsId}", + "httpMethod": "GET", + "id": "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DiscoveredApiOperation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveredApiObservations/[^/]+/discoveredApiOperations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApihubV1DiscoveredApiOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredApiObservations/{discoveredApiObservationsId}/discoveredApiOperations", + "httpMethod": "GET", + "id": "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. DiscoveredApiOperations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListDiscoveredApiApiOperations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDiscoveredApiApiOperations` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of DiscoveredApiOperations. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveredApiObservations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/discoveredApiOperations", + "response": { + "$ref": "GoogleCloudApihubV1ListDiscoveredApiOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "externalApis": { "methods": { "create": { @@ -2814,7 +2946,7 @@ } } }, - "revision": "20250701", + "revision": "20250731", "rootUrl": "https://apihub.googleapis.com/", "schemas": { "Empty": { @@ -3977,14 +4109,14 @@ }, "managementUrl": { "$ref": "GoogleCloudApihubV1AttributeValues", - "description": "Optional. The uri where users can navigate to for the management of the deployment. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-management-url` The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API." + "description": "Optional. The uri where users can navigate to for the management of the deployment. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-management-url` The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. The value of the attribute should be a valid URL." }, "name": { "description": "Identifier. The name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}`", "type": "string" }, "resourceUri": { - "description": "Required. A uri that uniquely identfies the deployment within a particular gateway. For example, if the runtime resource is of type APIGEE_PROXY, then this field will be a combination of org, proxy name and environment.", + "description": "Required. The resource URI identifies the deployment within its gateway. For Apigee gateways, its recommended to use the format: organizations/{org}/environments/{env}/apis/{api}. For ex: if a proxy with name `orders` is deployed in `staging` environment of `cymbal` organization, the resource URI would be: `organizations/cymbal/environments/staging/apis/orders`.", "type": "string" }, "slo": { @@ -4009,7 +4141,7 @@ }, "sourceUri": { "$ref": "GoogleCloudApihubV1AttributeValues", - "description": "Optional. The uri where additional source specific information for this deployment can be found. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-source-uri` The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API." + "description": "Optional. The uri where additional source specific information for this deployment can be found. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-source-uri` The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. The value of the attribute should be a valid URI, and in case of Cloud Storage URI, it should point to a Cloud Storage object, not a directory." }, "updateTime": { "description": "Output only. The time at which the deployment was last updated.", @@ -4062,6 +4194,181 @@ "properties": {}, "type": "object" }, + "GoogleCloudApihubV1DiscoveredApiObservation": { + "description": "Respresents an API Observation observed in one of the sources.", + "id": "GoogleCloudApihubV1DiscoveredApiObservation", + "properties": { + "apiOperationCount": { + "description": "Optional. The number of observed API Operations.", + "format": "int64", + "type": "string" + }, + "createTime": { + "description": "Output only. Create time stamp of the observation in API Hub.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "hostname": { + "description": "Optional. The hostname of requests processed for this Observation.", + "type": "string" + }, + "knownOperationsCount": { + "description": "Output only. The number of known API Operations.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "lastEventDetectedTime": { + "description": "Optional. Last event detected time stamp", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Identifier. The name of the discovered API Observation. Format: `projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}`", + "type": "string" + }, + "origin": { + "description": "Optional. For an observation pushed from a gcp resource, this would be the gcp project id.", + "type": "string" + }, + "serverIps": { + "description": "Optional. The IP address (IPv4 or IPv6) of the origin server that the request was sent to. This field can include port information. Examples: `\"192.168.1.1\"`, `\"10.0.0.1:80\"`, `\"FE80::0202:B3FF:FE1E:8329\"`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sourceLocations": { + "description": "Optional. The location of the observation source.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sourceMetadata": { + "$ref": "GoogleCloudApihubV1SourceMetadata", + "description": "Output only. The metadata of the source from which the observation was collected.", + "readOnly": true + }, + "sourceTypes": { + "description": "Optional. The type of the source from which the observation was collected.", + "items": { + "enum": [ + "SOURCE_TYPE_UNSPECIFIED", + "GCP_XLB", + "GCP_ILB" + ], + "enumDescriptions": [ + "Source type not specified.", + "GCP external load balancer.", + "GCP internal load balancer." + ], + "type": "string" + }, + "type": "array" + }, + "style": { + "description": "Optional. Style of ApiObservation", + "enum": [ + "STYLE_UNSPECIFIED", + "REST", + "GRPC", + "GRAPHQL" + ], + "enumDescriptions": [ + "Unknown style", + "Style is Rest API", + "Style is Grpc API", + "Style is GraphQL API" + ], + "type": "string" + }, + "unknownOperationsCount": { + "description": "Output only. The number of unknown API Operations.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp of the observation in API Hub.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApihubV1DiscoveredApiOperation": { + "description": "DiscoveredApiOperation represents an API Operation observed in one of the sources.", + "id": "GoogleCloudApihubV1DiscoveredApiOperation", + "properties": { + "classification": { + "description": "Output only. The classification of the discovered API operation.", + "enum": [ + "CLASSIFICATION_UNSPECIFIED", + "KNOWN", + "UNKNOWN" + ], + "enumDescriptions": [ + "Operation is not classified as known or unknown.", + "Operation has a matched catalog operation.", + "Operation does not have a matched catalog operation." + ], + "readOnly": true, + "type": "string" + }, + "count": { + "description": "Optional. The number of occurrences of this API Operation.", + "format": "int64", + "type": "string" + }, + "createTime": { + "description": "Output only. Create time stamp of the discovered API operation in API Hub.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "firstSeenTime": { + "description": "Optional. First seen time stamp", + "format": "google-datetime", + "type": "string" + }, + "httpOperation": { + "$ref": "GoogleCloudApihubV1HttpOperationDetails", + "description": "Optional. An HTTP Operation." + }, + "lastSeenTime": { + "description": "Optional. Last seen time stamp", + "format": "google-datetime", + "type": "string" + }, + "matchResults": { + "description": "Output only. The list of matched results for the discovered API operation. This will be populated only if the classification is known. The current usecase is for a single match. Keeping it repeated to support multiple matches in future.", + "items": { + "$ref": "GoogleCloudApihubV1MatchResult" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Identifier. The name of the discovered API Operation. Format: `projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation}`", + "type": "string" + }, + "sourceMetadata": { + "$ref": "GoogleCloudApihubV1SourceMetadata", + "description": "Output only. The metadata of the source from which the api operation was collected.", + "readOnly": true + }, + "updateTime": { + "description": "Output only. Update time stamp of the discovered API operation in API Hub.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApihubV1Documentation": { "description": "Documentation details.", "id": "GoogleCloudApihubV1Documentation", @@ -4220,6 +4527,42 @@ }, "type": "object" }, + "GoogleCloudApihubV1Header": { + "description": "An aggregation of HTTP header occurrences.", + "id": "GoogleCloudApihubV1Header", + "properties": { + "count": { + "description": "The number of occurrences of this Header across transactions.", + "format": "int64", + "type": "string" + }, + "dataType": { + "description": "Data type of header", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "BOOL", + "INTEGER", + "FLOAT", + "STRING", + "UUID" + ], + "enumDescriptions": [ + "Unspecified data type", + "Boolean data type", + "Integer data type", + "Float data type", + "String data type", + "UUID data type" + ], + "type": "string" + }, + "name": { + "description": "Header name.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApihubV1HostProjectRegistration": { "description": "Host project registration refers to the registration of a Google cloud project with Api Hub as a host project. This is the project where Api Hub is provisioned. It acts as the consumer project for the Api Hub instance provisioned. Multiple runtime projects can be attached to the host project and these attachments define the scope of Api Hub.", "id": "GoogleCloudApihubV1HostProjectRegistration", @@ -4289,6 +4632,75 @@ }, "type": "object" }, + "GoogleCloudApihubV1HttpOperationDetails": { + "description": "An HTTP-based API Operation, sometimes called a \"REST\" Operation.", + "id": "GoogleCloudApihubV1HttpOperationDetails", + "properties": { + "httpOperation": { + "$ref": "GoogleCloudApihubV1HttpOperation", + "description": "Required. An HTTP Operation." + }, + "pathParams": { + "description": "Optional. Path params of HttpOperation", + "items": { + "$ref": "GoogleCloudApihubV1PathParam" + }, + "type": "array" + }, + "queryParams": { + "additionalProperties": { + "$ref": "GoogleCloudApihubV1QueryParam" + }, + "description": "Optional. Query params of HttpOperation", + "type": "object" + }, + "request": { + "$ref": "GoogleCloudApihubV1HttpRequest", + "description": "Optional. Request metadata." + }, + "response": { + "$ref": "GoogleCloudApihubV1HttpResponse", + "description": "Optional. Response metadata." + } + }, + "type": "object" + }, + "GoogleCloudApihubV1HttpRequest": { + "description": "An aggregation of HTTP requests.", + "id": "GoogleCloudApihubV1HttpRequest", + "properties": { + "headers": { + "additionalProperties": { + "$ref": "GoogleCloudApihubV1Header" + }, + "description": "Optional. Unordered map from header name to header metadata", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudApihubV1HttpResponse": { + "description": "An aggregation of HTTP responses.", + "id": "GoogleCloudApihubV1HttpResponse", + "properties": { + "headers": { + "additionalProperties": { + "$ref": "GoogleCloudApihubV1Header" + }, + "description": "Optional. Unordered map from header name to header metadata", + "type": "object" + }, + "responseCodes": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "Optional. Map of status code to observed count", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudApihubV1Issue": { "description": "Issue contains the details of a single issue found by the linter.", "id": "GoogleCloudApihubV1Issue", @@ -4544,6 +4956,42 @@ }, "type": "object" }, + "GoogleCloudApihubV1ListDiscoveredApiObservationsResponse": { + "description": "Message for response to listing DiscoveredApiObservations", + "id": "GoogleCloudApihubV1ListDiscoveredApiObservationsResponse", + "properties": { + "discoveredApiObservations": { + "description": "The DiscoveredApiObservation from the specified project and location.", + "items": { + "$ref": "GoogleCloudApihubV1DiscoveredApiObservation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApihubV1ListDiscoveredApiOperationsResponse": { + "description": "Message for response to listing DiscoveredApiOperations", + "id": "GoogleCloudApihubV1ListDiscoveredApiOperationsResponse", + "properties": { + "discoveredApiOperations": { + "description": "The DiscoveredApiOperations from the specified project, location and DiscoveredApiObservation.", + "items": { + "$ref": "GoogleCloudApihubV1DiscoveredApiOperation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApihubV1ListExternalApisResponse": { "description": "The ListExternalApis method's response.", "id": "GoogleCloudApihubV1ListExternalApisResponse", @@ -4692,6 +5140,18 @@ }, "type": "object" }, + "GoogleCloudApihubV1MatchResult": { + "description": "MatchResult represents the result of matching a discovered API operation with a catalog API operation.", + "id": "GoogleCloudApihubV1MatchResult", + "properties": { + "name": { + "description": "Output only. The name of the matched API Operation. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApihubV1MultiIntValues": { "description": "The config variable value of data type multi int.", "id": "GoogleCloudApihubV1MultiIntValues", @@ -4881,12 +5341,44 @@ }, "type": "object" }, + "GoogleCloudApihubV1PathParam": { + "description": "HTTP Path parameter.", + "id": "GoogleCloudApihubV1PathParam", + "properties": { + "dataType": { + "description": "Optional. Data type of path param", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "BOOL", + "INTEGER", + "FLOAT", + "STRING", + "UUID" + ], + "enumDescriptions": [ + "Unspecified data type", + "Boolean data type", + "Integer data type", + "Float data type", + "String data type", + "UUID data type" + ], + "type": "string" + }, + "position": { + "description": "Optional. Segment location in the path, 1-indexed", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudApihubV1Plugin": { "description": "A plugin resource in the API Hub.", "id": "GoogleCloudApihubV1Plugin", "properties": { "actionsConfig": { - "description": "Optional. The configuration of actions supported by the plugin.", + "description": "Required. The configuration of actions supported by the plugin.", "items": { "$ref": "GoogleCloudApihubV1PluginActionConfig" }, @@ -5080,7 +5572,7 @@ "type": "string" }, "sourceProjectId": { - "description": "Optional. The source project id of the plugin instance. This will be the id of runtime project in case of gcp based plugins and org id in case of non gcp based plugins. This is a required field.", + "description": "Optional. The source project id of the plugin instance. This will be the id of runtime project in case of gcp based plugins and org id in case of non gcp based plugins. This field will be a required field for Google provided on-ramp plugins.", "type": "string" }, "state": { @@ -5223,6 +5715,42 @@ }, "type": "object" }, + "GoogleCloudApihubV1QueryParam": { + "description": "An aggregation of HTTP query parameter occurrences.", + "id": "GoogleCloudApihubV1QueryParam", + "properties": { + "count": { + "description": "Optional. The number of occurrences of this query parameter across transactions.", + "format": "int64", + "type": "string" + }, + "dataType": { + "description": "Optional. Data type of path param", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "BOOL", + "INTEGER", + "FLOAT", + "STRING", + "UUID" + ], + "enumDescriptions": [ + "Unspecified data type", + "Boolean data type", + "Integer data type", + "Float data type", + "String data type", + "UUID data type" + ], + "type": "string" + }, + "name": { + "description": "Required. Name of query param", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApihubV1Range": { "description": "Object describing where in the file the issue was found.", "id": "GoogleCloudApihubV1Range", diff --git a/apihub/v1/apihub-gen.go b/apihub/v1/apihub-gen.go index d115a3530f..ac6e1a1d65 100644 --- a/apihub/v1/apihub-gen.go +++ b/apihub/v1/apihub-gen.go @@ -174,6 +174,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Curations = NewProjectsLocationsCurationsService(s) rs.Dependencies = NewProjectsLocationsDependenciesService(s) rs.Deployments = NewProjectsLocationsDeploymentsService(s) + rs.DiscoveredApiObservations = NewProjectsLocationsDiscoveredApiObservationsService(s) rs.ExternalApis = NewProjectsLocationsExternalApisService(s) rs.HostProjectRegistrations = NewProjectsLocationsHostProjectRegistrationsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) @@ -197,6 +198,8 @@ type ProjectsLocationsService struct { Deployments *ProjectsLocationsDeploymentsService + DiscoveredApiObservations *ProjectsLocationsDiscoveredApiObservationsService + ExternalApis *ProjectsLocationsExternalApisService HostProjectRegistrations *ProjectsLocationsHostProjectRegistrationsService @@ -310,6 +313,27 @@ type ProjectsLocationsDeploymentsService struct { s *Service } +func NewProjectsLocationsDiscoveredApiObservationsService(s *Service) *ProjectsLocationsDiscoveredApiObservationsService { + rs := &ProjectsLocationsDiscoveredApiObservationsService{s: s} + rs.DiscoveredApiOperations = NewProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService(s) + return rs +} + +type ProjectsLocationsDiscoveredApiObservationsService struct { + s *Service + + DiscoveredApiOperations *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService +} + +func NewProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService(s *Service) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService { + rs := &ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService{s: s} + return rs +} + +type ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService struct { + s *Service +} + func NewProjectsLocationsExternalApisService(s *Service) *ProjectsLocationsExternalApisService { rs := &ProjectsLocationsExternalApisService{s: s} return rs @@ -1663,15 +1687,18 @@ type GoogleCloudApihubV1Deployment struct { // attribute: // `projects/{project}/locations/{location}/attributes/system-management-url` // The number of values for this attribute will be based on the cardinality of - // the attribute. The same can be retrieved via GetAttribute API. + // the attribute. The same can be retrieved via GetAttribute API. The value of + // the attribute should be a valid URL. ManagementUrl *GoogleCloudApihubV1AttributeValues `json:"managementUrl,omitempty"` // Name: Identifier. The name of the deployment. Format: // `projects/{project}/locations/{location}/deployments/{deployment}` Name string `json:"name,omitempty"` - // ResourceUri: Required. A uri that uniquely identfies the deployment within a - // particular gateway. For example, if the runtime resource is of type - // APIGEE_PROXY, then this field will be a combination of org, proxy name and - // environment. + // ResourceUri: Required. The resource URI identifies the deployment within its + // gateway. For Apigee gateways, its recommended to use the format: + // organizations/{org}/environments/{env}/apis/{api}. For ex: if a proxy with + // name `orders` is deployed in `staging` environment of `cymbal` organization, + // the resource URI would be: + // `organizations/cymbal/environments/staging/apis/orders`. ResourceUri string `json:"resourceUri,omitempty"` // Slo: Optional. The SLO for this deployment. This maps to the following // system defined attribute: @@ -1695,7 +1722,9 @@ type GoogleCloudApihubV1Deployment struct { // attribute: // `projects/{project}/locations/{location}/attributes/system-source-uri` The // number of values for this attribute will be based on the cardinality of the - // attribute. The same can be retrieved via GetAttribute API. + // attribute. The same can be retrieved via GetAttribute API. The value of the + // attribute should be a valid URI, and in case of Cloud Storage URI, it should + // point to a Cloud Storage object, not a directory. SourceUri *GoogleCloudApihubV1AttributeValues `json:"sourceUri,omitempty"` // UpdateTime: Output only. The time at which the deployment was last updated. UpdateTime string `json:"updateTime,omitempty"` @@ -1780,6 +1809,135 @@ func (s GoogleCloudApihubV1DisablePluginInstanceActionRequest) MarshalJSON() ([] type GoogleCloudApihubV1DisablePluginRequest struct { } +// GoogleCloudApihubV1DiscoveredApiObservation: Respresents an API Observation +// observed in one of the sources. +type GoogleCloudApihubV1DiscoveredApiObservation struct { + // ApiOperationCount: Optional. The number of observed API Operations. + ApiOperationCount int64 `json:"apiOperationCount,omitempty,string"` + // CreateTime: Output only. Create time stamp of the observation in API Hub. + CreateTime string `json:"createTime,omitempty"` + // Hostname: Optional. The hostname of requests processed for this Observation. + Hostname string `json:"hostname,omitempty"` + // KnownOperationsCount: Output only. The number of known API Operations. + KnownOperationsCount int64 `json:"knownOperationsCount,omitempty,string"` + // LastEventDetectedTime: Optional. Last event detected time stamp + LastEventDetectedTime string `json:"lastEventDetectedTime,omitempty"` + // Name: Identifier. The name of the discovered API Observation. Format: + // `projects/{project}/locations/{location}/discoveredApiObservations/{discovere + // d_api_observation}` + Name string `json:"name,omitempty"` + // Origin: Optional. For an observation pushed from a gcp resource, this would + // be the gcp project id. + Origin string `json:"origin,omitempty"` + // ServerIps: Optional. The IP address (IPv4 or IPv6) of the origin server that + // the request was sent to. This field can include port information. Examples: + // "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329". + ServerIps []string `json:"serverIps,omitempty"` + // SourceLocations: Optional. The location of the observation source. + SourceLocations []string `json:"sourceLocations,omitempty"` + // SourceMetadata: Output only. The metadata of the source from which the + // observation was collected. + SourceMetadata *GoogleCloudApihubV1SourceMetadata `json:"sourceMetadata,omitempty"` + // SourceTypes: Optional. The type of the source from which the observation was + // collected. + // + // Possible values: + // "SOURCE_TYPE_UNSPECIFIED" - Source type not specified. + // "GCP_XLB" - GCP external load balancer. + // "GCP_ILB" - GCP internal load balancer. + SourceTypes []string `json:"sourceTypes,omitempty"` + // Style: Optional. Style of ApiObservation + // + // Possible values: + // "STYLE_UNSPECIFIED" - Unknown style + // "REST" - Style is Rest API + // "GRPC" - Style is Grpc API + // "GRAPHQL" - Style is GraphQL API + Style string `json:"style,omitempty"` + // UnknownOperationsCount: Output only. The number of unknown API Operations. + UnknownOperationsCount int64 `json:"unknownOperationsCount,omitempty,string"` + // UpdateTime: Output only. Update time stamp of the observation in API Hub. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ApiOperationCount") 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. "ApiOperationCount") 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 GoogleCloudApihubV1DiscoveredApiObservation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1DiscoveredApiObservation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApihubV1DiscoveredApiOperation: DiscoveredApiOperation represents +// an API Operation observed in one of the sources. +type GoogleCloudApihubV1DiscoveredApiOperation struct { + // Classification: Output only. The classification of the discovered API + // operation. + // + // Possible values: + // "CLASSIFICATION_UNSPECIFIED" - Operation is not classified as known or + // unknown. + // "KNOWN" - Operation has a matched catalog operation. + // "UNKNOWN" - Operation does not have a matched catalog operation. + Classification string `json:"classification,omitempty"` + // Count: Optional. The number of occurrences of this API Operation. + Count int64 `json:"count,omitempty,string"` + // CreateTime: Output only. Create time stamp of the discovered API operation + // in API Hub. + CreateTime string `json:"createTime,omitempty"` + // FirstSeenTime: Optional. First seen time stamp + FirstSeenTime string `json:"firstSeenTime,omitempty"` + // HttpOperation: Optional. An HTTP Operation. + HttpOperation *GoogleCloudApihubV1HttpOperationDetails `json:"httpOperation,omitempty"` + // LastSeenTime: Optional. Last seen time stamp + LastSeenTime string `json:"lastSeenTime,omitempty"` + // MatchResults: Output only. The list of matched results for the discovered + // API operation. This will be populated only if the classification is known. + // The current usecase is for a single match. Keeping it repeated to support + // multiple matches in future. + MatchResults []*GoogleCloudApihubV1MatchResult `json:"matchResults,omitempty"` + // Name: Identifier. The name of the discovered API Operation. Format: + // `projects/{project}/locations/{location}/discoveredApiObservations/{discovere + // d_api_observation}/discoveredApiOperations/{discovered_api_operation}` + Name string `json:"name,omitempty"` + // SourceMetadata: Output only. The metadata of the source from which the api + // operation was collected. + SourceMetadata *GoogleCloudApihubV1SourceMetadata `json:"sourceMetadata,omitempty"` + // UpdateTime: Output only. Update time stamp of the discovered API operation + // in API Hub. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Classification") 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. "Classification") 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 GoogleCloudApihubV1DiscoveredApiOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1DiscoveredApiOperation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1Documentation: Documentation details. type GoogleCloudApihubV1Documentation struct { // ExternalUri: Optional. The uri of the externally hosted documentation. @@ -2008,6 +2166,40 @@ func (s GoogleCloudApihubV1GoogleServiceAccountConfig) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1Header: An aggregation of HTTP header occurrences. +type GoogleCloudApihubV1Header struct { + // Count: The number of occurrences of this Header across transactions. + Count int64 `json:"count,omitempty,string"` + // DataType: Data type of header + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Unspecified data type + // "BOOL" - Boolean data type + // "INTEGER" - Integer data type + // "FLOAT" - Float data type + // "STRING" - String data type + // "UUID" - UUID data type + DataType string `json:"dataType,omitempty"` + // Name: Header name. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 GoogleCloudApihubV1Header) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1Header + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1HostProjectRegistration: Host project registration refers // to the registration of a Google cloud project with Api Hub as a host // project. This is the project where Api Hub is provisioned. It acts as the @@ -2113,6 +2305,83 @@ func (s GoogleCloudApihubV1HttpOperation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1HttpOperationDetails: An HTTP-based API Operation, +// sometimes called a "REST" Operation. +type GoogleCloudApihubV1HttpOperationDetails struct { + // HttpOperation: Required. An HTTP Operation. + HttpOperation *GoogleCloudApihubV1HttpOperation `json:"httpOperation,omitempty"` + // PathParams: Optional. Path params of HttpOperation + PathParams []*GoogleCloudApihubV1PathParam `json:"pathParams,omitempty"` + // QueryParams: Optional. Query params of HttpOperation + QueryParams map[string]GoogleCloudApihubV1QueryParam `json:"queryParams,omitempty"` + // Request: Optional. Request metadata. + Request *GoogleCloudApihubV1HttpRequest `json:"request,omitempty"` + // Response: Optional. Response metadata. + Response *GoogleCloudApihubV1HttpResponse `json:"response,omitempty"` + // ForceSendFields is a list of field names (e.g. "HttpOperation") 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. "HttpOperation") 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 GoogleCloudApihubV1HttpOperationDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1HttpOperationDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApihubV1HttpRequest: An aggregation of HTTP requests. +type GoogleCloudApihubV1HttpRequest struct { + // Headers: Optional. Unordered map from header name to header metadata + Headers map[string]GoogleCloudApihubV1Header `json:"headers,omitempty"` + // ForceSendFields is a list of field names (e.g. "Headers") 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. "Headers") 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 GoogleCloudApihubV1HttpRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1HttpRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApihubV1HttpResponse: An aggregation of HTTP responses. +type GoogleCloudApihubV1HttpResponse struct { + // Headers: Optional. Unordered map from header name to header metadata + Headers map[string]GoogleCloudApihubV1Header `json:"headers,omitempty"` + // ResponseCodes: Optional. Map of status code to observed count + ResponseCodes map[string]string `json:"responseCodes,omitempty"` + // ForceSendFields is a list of field names (e.g. "Headers") 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. "Headers") 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 GoogleCloudApihubV1HttpResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1HttpResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1Issue: Issue contains the details of a single issue found // by the linter. type GoogleCloudApihubV1Issue struct { @@ -2411,6 +2680,66 @@ func (s GoogleCloudApihubV1ListDeploymentsResponse) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1ListDiscoveredApiObservationsResponse: Message for +// response to listing DiscoveredApiObservations +type GoogleCloudApihubV1ListDiscoveredApiObservationsResponse struct { + // DiscoveredApiObservations: The DiscoveredApiObservation from the specified + // project and location. + DiscoveredApiObservations []*GoogleCloudApihubV1DiscoveredApiObservation `json:"discoveredApiObservations,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + 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. "DiscoveredApiObservations") + // 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. "DiscoveredApiObservations") 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 GoogleCloudApihubV1ListDiscoveredApiObservationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1ListDiscoveredApiObservationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApihubV1ListDiscoveredApiOperationsResponse: Message for response +// to listing DiscoveredApiOperations +type GoogleCloudApihubV1ListDiscoveredApiOperationsResponse struct { + // DiscoveredApiOperations: The DiscoveredApiOperations from the specified + // project, location and DiscoveredApiObservation. + DiscoveredApiOperations []*GoogleCloudApihubV1DiscoveredApiOperation `json:"discoveredApiOperations,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + 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. "DiscoveredApiOperations") 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. "DiscoveredApiOperations") 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 GoogleCloudApihubV1ListDiscoveredApiOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1ListDiscoveredApiOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1ListExternalApisResponse: The ListExternalApis method's // response. type GoogleCloudApihubV1ListExternalApisResponse struct { @@ -2665,6 +2994,31 @@ func (s GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1MatchResult: MatchResult represents the result of +// matching a discovered API operation with a catalog API operation. +type GoogleCloudApihubV1MatchResult struct { + // Name: Output only. The name of the matched API Operation. Format: + // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operat + // ions/{operation}` + 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 + // 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. "Name") 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 GoogleCloudApihubV1MatchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1MatchResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1MultiIntValues: The config variable value of data type // multi int. type GoogleCloudApihubV1MultiIntValues struct { @@ -2922,9 +3276,41 @@ func (s GoogleCloudApihubV1Path) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1PathParam: HTTP Path parameter. +type GoogleCloudApihubV1PathParam struct { + // DataType: Optional. Data type of path param + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Unspecified data type + // "BOOL" - Boolean data type + // "INTEGER" - Integer data type + // "FLOAT" - Float data type + // "STRING" - String data type + // "UUID" - UUID data type + DataType string `json:"dataType,omitempty"` + // Position: Optional. Segment location in the path, 1-indexed + Position int64 `json:"position,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataType") 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. "DataType") 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 GoogleCloudApihubV1PathParam) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1PathParam + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1Plugin: A plugin resource in the API Hub. type GoogleCloudApihubV1Plugin struct { - // ActionsConfig: Optional. The configuration of actions supported by the + // ActionsConfig: Required. The configuration of actions supported by the // plugin. ActionsConfig []*GoogleCloudApihubV1PluginActionConfig `json:"actionsConfig,omitempty"` // ConfigTemplate: Optional. The configuration template for the plugin. @@ -3110,7 +3496,8 @@ type GoogleCloudApihubV1PluginInstance struct { Name string `json:"name,omitempty"` // SourceProjectId: Optional. The source project id of the plugin instance. // This will be the id of runtime project in case of gcp based plugins and org - // id in case of non gcp based plugins. This is a required field. + // id in case of non gcp based plugins. This field will be a required field for + // Google provided on-ramp plugins. SourceProjectId string `json:"sourceProjectId,omitempty"` // State: Output only. The current state of the plugin instance (e.g., enabled, // disabled, provisioning). @@ -3303,6 +3690,42 @@ func (s GoogleCloudApihubV1Point) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1QueryParam: An aggregation of HTTP query parameter +// occurrences. +type GoogleCloudApihubV1QueryParam struct { + // Count: Optional. The number of occurrences of this query parameter across + // transactions. + Count int64 `json:"count,omitempty,string"` + // DataType: Optional. Data type of path param + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Unspecified data type + // "BOOL" - Boolean data type + // "INTEGER" - Integer data type + // "FLOAT" - Float data type + // "STRING" - String data type + // "UUID" - UUID data type + DataType string `json:"dataType,omitempty"` + // Name: Required. Name of query param + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 GoogleCloudApihubV1QueryParam) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1QueryParam + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1Range: Object describing where in the file the issue was // found. type GoogleCloudApihubV1Range struct { @@ -10606,6 +11029,9 @@ func (r *ProjectsLocationsDeploymentsService) List(parent string) *ProjectsLocat // operators: `>` and `<`. * `resource_uri` - A URI to the deployment resource. // Allowed comparison operators: `=`. * `api_versions` - The API versions // linked to this deployment. Allowed comparison operators: `:`. * +// `source_project` - The project/organization at source for the deployment. +// Allowed comparison operators: `=`. * `source_environment` - The environment +// at source for the deployment. Allowed comparison operators: `=`. * // `deployment_type.enum_values.values.id` - The allowed value id of the // deployment_type attribute associated with the Deployment. Allowed comparison // operators: `:`. * `deployment_type.enum_values.values.display_name` - The @@ -10924,6 +11350,538 @@ func (c *ProjectsLocationsDeploymentsPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsDiscoveredApiObservationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DiscoveredAPIObservation in a given project, location and +// ApiObservation. +// +// - name: The name of the DiscoveredApiObservation to retrieve. Format: +// projects/{project}/locations/{location}/discoveredApiObservations/{discover +// ed_api_observation}. +func (r *ProjectsLocationsDiscoveredApiObservationsService) Get(name string) *ProjectsLocationsDiscoveredApiObservationsGetCall { + c := &ProjectsLocationsDiscoveredApiObservationsGetCall{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 *ProjectsLocationsDiscoveredApiObservationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredApiObservationsGetCall { + 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 *ProjectsLocationsDiscoveredApiObservationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredApiObservationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDiscoveredApiObservationsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredApiObservationsGetCall { + 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 *ProjectsLocationsDiscoveredApiObservationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDiscoveredApiObservationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apihub.projects.locations.discoveredApiObservations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApihubV1DiscoveredApiObservation.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 *ProjectsLocationsDiscoveredApiObservationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1DiscoveredApiObservation, 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 := &GoogleCloudApihubV1DiscoveredApiObservation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDiscoveredApiObservationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the DiscoveredAPIObservations in a given project and +// location. +// +// - parent: The parent, which owns this collection of ApiObservations. Format: +// projects/{project}/locations/{location}. +func (r *ProjectsLocationsDiscoveredApiObservationsService) List(parent string) *ProjectsLocationsDiscoveredApiObservationsListCall { + c := &ProjectsLocationsDiscoveredApiObservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// ApiObservations to return. The service may return fewer than this value. If +// unspecified, at most 10 ApiObservations will be returned. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDiscoveredApiObservationsListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredApiObservationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListApiObservations` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListApiObservations` must match the call that provided the page token. +func (c *ProjectsLocationsDiscoveredApiObservationsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredApiObservationsListCall { + 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 *ProjectsLocationsDiscoveredApiObservationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredApiObservationsListCall { + 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 *ProjectsLocationsDiscoveredApiObservationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredApiObservationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDiscoveredApiObservationsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredApiObservationsListCall { + 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 *ProjectsLocationsDiscoveredApiObservationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDiscoveredApiObservationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/discoveredApiObservations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apihub.projects.locations.discoveredApiObservations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApihubV1ListDiscoveredApiObservationsResponse.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 *ProjectsLocationsDiscoveredApiObservationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListDiscoveredApiObservationsResponse, 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 := &GoogleCloudApihubV1ListDiscoveredApiObservationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsDiscoveredApiObservationsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListDiscoveredApiObservationsResponse) 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 ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DiscoveredAPIOperation in a given project, location, +// ApiObservation and ApiOperation. +// +// - name: The name of the DiscoveredApiOperation to retrieve. Format: +// projects/{project}/locations/{location}/discoveredApiObservations/{discover +// ed_api_observation}/discoveredApiOperations/{discovered_api_operation}. +func (r *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService) Get(name string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall { + c := &ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall{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 *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall { + 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 *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall { + 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 *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApihubV1DiscoveredApiOperation.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 *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1DiscoveredApiOperation, 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 := &GoogleCloudApihubV1DiscoveredApiOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the DiscoveredAPIOperations in a given project, location and +// ApiObservation. +// +// - parent: The parent, which owns this collection of DiscoveredApiOperations. +// Format: +// projects/{project}/locations/{location}/discoveredApiObservations/{discover +// ed_api_observation}. +func (r *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService) List(parent string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall { + c := &ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": DiscoveredApiOperations +// will be returned. The maximum value is 1000; values above 1000 will be +// coerced to 1000. +func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListDiscoveredApiApiOperations` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to `ListDiscoveredApiApiOperations` must match the call that provided the +// page token. +func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall { + 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 *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall { + 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 *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall { + 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 *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/discoveredApiOperations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApihubV1ListDiscoveredApiOperationsResponse.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 *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListDiscoveredApiOperationsResponse, 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 := &GoogleCloudApihubV1ListDiscoveredApiOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListDiscoveredApiOperationsResponse) 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 ProjectsLocationsExternalApisCreateCall struct { s *Service parent string diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index 09568a9984..d87ec1d0a4 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -371,7 +371,7 @@ ] }, "patch": { - "description": "Update a BackupPlanAssociation", + "description": "Update a BackupPlanAssociation.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupPlanAssociations/{backupPlanAssociationsId}", "httpMethod": "PATCH", "id": "backupdr.projects.locations.backupPlanAssociations.patch", @@ -581,7 +581,7 @@ ] }, "patch": { - "description": "Update a BackupPlan", + "description": "Update a BackupPlan.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupPlans/{backupPlansId}", "httpMethod": "PATCH", "id": "backupdr.projects.locations.backupPlans.patch", @@ -2060,7 +2060,7 @@ } } }, - "revision": "20250720", + "revision": "20250723", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AbandonBackupRequest": { @@ -2899,7 +2899,7 @@ "id": "BackupPlan", "properties": { "backupRules": { - "description": "Optional. The backup rules for this `BackupPlan`. There must be at least one `BackupRule` message if on_demand_retention_limit_days is not set.", + "description": "Optional. The backup rules for this `BackupPlan`.", "items": { "$ref": "BackupRule" }, @@ -2936,7 +2936,7 @@ "type": "object" }, "logRetentionDays": { - "description": "Optional. Required for CloudSQL resource_type Configures how long logs will be stored. It is defined in “days”. This value should be greater than or equal to minimum enforced log retention duration of the backup vault.", + "description": "Optional. Applicable only for CloudSQL resource_type. Configures how long logs will be stored. It is defined in “days”. This value should be greater than or equal to minimum enforced log retention duration of the backup vault.", "format": "int64", "type": "string" }, @@ -2946,7 +2946,7 @@ "type": "string" }, "resourceType": { - "description": "Required. ", + "description": "Required. The resource type to which the `BackupPlan` will be applied. Examples include, \"compute.googleapis.com/Instance\", \"sqladmin.googleapis.com/Instance\", \"alloydb.googleapis.com/Cluster\", \"compute.googleapis.com/Disk\".", "type": "string" }, "revisionId": { @@ -3041,7 +3041,7 @@ "type": "string" }, "resourceType": { - "description": "Required. Immutable. ", + "description": "Required. Immutable. Resource type of workload on which backupplan is applied", "type": "string" }, "rulesConfigInfo": { @@ -3329,7 +3329,7 @@ "type": "object" }, "CloudSqlInstanceBackupProperties": { - "description": "CloudSqlInstanceBackupProperties represents Cloud SQL Instance Backup properties. .", + "description": "CloudSqlInstanceBackupProperties represents Cloud SQL Instance Backup properties.", "id": "CloudSqlInstanceBackupProperties", "properties": { "databaseInstalledVersion": { @@ -3356,7 +3356,7 @@ "type": "object" }, "CloudSqlInstanceDataSourceProperties": { - "description": "CloudSqlInstanceDataSourceProperties represents the properties of a Cloud SQL resource that are stored in the DataSource. .", + "description": "CloudSqlInstanceDataSourceProperties represents the properties of a Cloud SQL resource that are stored in the DataSource.", "id": "CloudSqlInstanceDataSourceProperties", "properties": { "databaseInstalledVersion": { @@ -3384,7 +3384,7 @@ "type": "object" }, "CloudSqlInstanceDataSourceReferenceProperties": { - "description": "CloudSqlInstanceDataSourceReferenceProperties represents the properties of a Cloud SQL resource that are stored in the DataSourceReference. .", + "description": "CloudSqlInstanceDataSourceReferenceProperties represents the properties of a Cloud SQL resource that are stored in the DataSourceReference.", "id": "CloudSqlInstanceDataSourceReferenceProperties", "properties": { "databaseInstalledVersion": { @@ -4182,7 +4182,7 @@ "type": "array" }, "name": { - "description": "Required. Name of the disk..", + "description": "Required. Name of the disk.", "type": "string" }, "physicalBlockSizeBytes": { @@ -5955,7 +5955,7 @@ "type": "string" }, "ruleId": { - "description": "Required. backup rule_id for which a backup needs to be triggered.", + "description": "Optional. backup rule_id for which a backup needs to be triggered. If not specified, on-demand backup with custom retention will be triggered.", "type": "string" } }, diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index f379242136..9cc170b5ea 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -1164,9 +1164,7 @@ func (s BackupLock) MarshalJSON() ([]byte, error) { // `BackupRule` has a retention policy and defines a schedule by which the // system is to perform backup workloads. type BackupPlan struct { - // BackupRules: Optional. The backup rules for this `BackupPlan`. There must be - // at least one `BackupRule` message if on_demand_retention_limit_days is not - // set. + // BackupRules: Optional. The backup rules for this `BackupPlan`. BackupRules []*BackupRule `json:"backupRules,omitempty"` // BackupVault: Required. Resource name of backup vault which will be used as // storage location for backups. Format: @@ -1191,15 +1189,18 @@ type BackupPlan struct { // Labels: Optional. This collection of key/value pairs allows for custom // labels to be supplied by the user. Example, {"tag": "Weekly"}. Labels map[string]string `json:"labels,omitempty"` - // LogRetentionDays: Optional. Required for CloudSQL resource_type Configures - // how long logs will be stored. It is defined in “days”. This value should - // be greater than or equal to minimum enforced log retention duration of the - // backup vault. + // LogRetentionDays: Optional. Applicable only for CloudSQL resource_type. + // Configures how long logs will be stored. It is defined in “days”. This + // value should be greater than or equal to minimum enforced log retention + // duration of the backup vault. LogRetentionDays int64 `json:"logRetentionDays,omitempty,string"` // Name: Output only. Identifier. The resource name of the `BackupPlan`. // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` Name string `json:"name,omitempty"` - // ResourceType: Required. + // ResourceType: Required. The resource type to which the `BackupPlan` will be + // applied. Examples include, "compute.googleapis.com/Instance", + // "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", + // "compute.googleapis.com/Disk". ResourceType string `json:"resourceType,omitempty"` // RevisionId: Output only. The user friendly revision ID of the // `BackupPlanRevision`. Example: v0, v1, v2, etc. @@ -1282,7 +1283,8 @@ type BackupPlanAssociation struct { // "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-%20//%20a/instances/my-instance"). Resource string `json:"resource,omitempty"` - // ResourceType: Required. Immutable. + // ResourceType: Required. Immutable. Resource type of workload on which + // backupplan is applied ResourceType string `json:"resourceType,omitempty"` // RulesConfigInfo: Output only. The config info related to backup rules. RulesConfigInfo []*RuleConfigInfo `json:"rulesConfigInfo,omitempty"` @@ -1652,7 +1654,7 @@ func (s CloudSqlInstanceBackupPlanAssociationProperties) MarshalJSON() ([]byte, } // CloudSqlInstanceBackupProperties: CloudSqlInstanceBackupProperties -// represents Cloud SQL Instance Backup properties. . +// represents Cloud SQL Instance Backup properties. type CloudSqlInstanceBackupProperties struct { // DatabaseInstalledVersion: Output only. The installed database version of the // Cloud SQL instance when the backup was taken. @@ -1685,7 +1687,7 @@ func (s CloudSqlInstanceBackupProperties) MarshalJSON() ([]byte, error) { // CloudSqlInstanceDataSourceProperties: CloudSqlInstanceDataSourceProperties // represents the properties of a Cloud SQL resource that are stored in the -// DataSource. . +// DataSource. type CloudSqlInstanceDataSourceProperties struct { // DatabaseInstalledVersion: Output only. The installed database version of the // Cloud SQL instance. @@ -1718,7 +1720,7 @@ func (s CloudSqlInstanceDataSourceProperties) MarshalJSON() ([]byte, error) { // CloudSqlInstanceDataSourceReferenceProperties: // CloudSqlInstanceDataSourceReferenceProperties represents the properties of a -// Cloud SQL resource that are stored in the DataSourceReference. . +// Cloud SQL resource that are stored in the DataSourceReference. type CloudSqlInstanceDataSourceReferenceProperties struct { // DatabaseInstalledVersion: Output only. The installed database version of the // Cloud SQL instance. @@ -2498,7 +2500,7 @@ type DiskRestoreProperties struct { // applicable to this backup. This is applicable if the original image had // licenses attached, e.g. Windows image Licenses []string `json:"licenses,omitempty"` - // Name: Required. Name of the disk.. + // Name: Required. Name of the disk. Name string `json:"name,omitempty"` // PhysicalBlockSizeBytes: Optional. Physical block size of the persistent // disk, in bytes. If not present in a request, a default value is used. @@ -4803,7 +4805,8 @@ type TriggerBackupRequest struct { // exception that zero UUID is not supported // (00000000-0000-0000-0000-000000000000). RequestId string `json:"requestId,omitempty"` - // RuleId: Required. backup rule_id for which a backup needs to be triggered. + // RuleId: Optional. backup rule_id for which a backup needs to be triggered. + // If not specified, on-demand backup with custom retention will be triggered. RuleId string `json:"ruleId,omitempty"` // ForceSendFields is a list of field names (e.g. "RequestId") to // unconditionally include in API requests. By default, fields with empty or @@ -5890,7 +5893,7 @@ type ProjectsLocationsBackupPlanAssociationsPatchCall struct { header_ http.Header } -// Patch: Update a BackupPlanAssociation +// Patch: Update a BackupPlanAssociation. // // - name: Output only. Identifier. The resource name of BackupPlanAssociation // in below format Format : @@ -6652,7 +6655,7 @@ type ProjectsLocationsBackupPlansPatchCall struct { header_ http.Header } -// Patch: Update a BackupPlan +// Patch: Update a BackupPlan. // // - name: Output only. Identifier. The resource name of the `BackupPlan`. // Format: diff --git a/beyondcorp/v1/beyondcorp-api.json b/beyondcorp/v1/beyondcorp-api.json index 575006fe40..677df29c51 100644 --- a/beyondcorp/v1/beyondcorp-api.json +++ b/beyondcorp/v1/beyondcorp-api.json @@ -1347,7 +1347,7 @@ "securityGateways": { "methods": { "create": { - "description": "Creates a new SecurityGateway in a given project and location.", + "description": "Creates a new Security Gateway in a given project and location.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/securityGateways", "httpMethod": "POST", "id": "beyondcorp.projects.locations.securityGateways.create", @@ -1363,7 +1363,7 @@ "type": "string" }, "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.", "location": "query", "type": "string" }, @@ -1659,7 +1659,7 @@ ] }, "delete": { - "description": "Deletes a single Application.", + "description": "Deletes a single application.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications/{applicationsId}", "httpMethod": "DELETE", "id": "beyondcorp.projects.locations.securityGateways.applications.delete", @@ -1899,7 +1899,7 @@ } } }, - "revision": "20250714", + "revision": "20250723", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -3131,7 +3131,7 @@ "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1Application": { - "description": "A Beyondcorp Application resource information.", + "description": "The information about an application resource.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1Application", "properties": { "createTime": { @@ -3141,11 +3141,11 @@ "type": "string" }, "displayName": { - "description": "Optional. An arbitrary user-provided name for the Application resource. Cannot exceed 64 characters.", + "description": "Optional. An arbitrary user-provided name for the application resource. Cannot exceed 64 characters.", "type": "string" }, "endpointMatchers": { - "description": "Required. Endpoint matchers associated with an application. A combination of hostname and ports as endpoint matcher is used to match the application. Match conditions for OR logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if one the conditions are met. The conditions can be one of the following combination (Hostname), (Hostname \u0026 Ports) EXAMPLES: Hostname - (\"*.abc.com\"), (\"xyz.abc.com\") Hostname and Ports - (\"abc.com\" and \"22\"), (\"abc.com\" and \"22,33\") etc", + "description": "Required. Endpoint matchers associated with an application. A combination of hostname and ports as endpoint matchers is used to match the application. Match conditions for OR logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if one of the conditions is met. The conditions can be one of the following combinations (Hostname), (Hostname \u0026 Ports) EXAMPLES: Hostname - (\"*.example.com\"), (\"xyz.example.com\") Hostname and Ports - (\"example.com\" and \"22\"), (\"example.com\" and \"22,33\") etc", "items": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1EndpointMatcher" }, @@ -3307,7 +3307,7 @@ "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1SecurityGateway": { - "description": "Information about a BeyondCorp SecurityGateway resource.", + "description": "The information about a security gateway resource.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1SecurityGateway", "properties": { "createTime": { @@ -3361,7 +3361,7 @@ "SecurityGateway is being updated.", "SecurityGateway is being deleted.", "SecurityGateway is running.", - "SecurityGateway is down and may be restored in the future. This happens when CCFE sends ProjectState = OFF.", + "SecurityGateway is down and may be restored in the future.", "SecurityGateway encountered an error and is in an indeterministic state." ], "readOnly": true, diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go index e210cedcdd..747229d918 100644 --- a/beyondcorp/v1/beyondcorp-gen.go +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -1566,22 +1566,22 @@ func (s GoogleCloudBeyondcorpPartnerservicesV1mainPartnerServiceOperationMetadat return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpSecuritygatewaysV1Application: A Beyondcorp Application -// resource information. +// GoogleCloudBeyondcorpSecuritygatewaysV1Application: The information about an +// application resource. type GoogleCloudBeyondcorpSecuritygatewaysV1Application struct { // CreateTime: Output only. Timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` - // DisplayName: Optional. An arbitrary user-provided name for the Application + // DisplayName: Optional. An arbitrary user-provided name for the application // resource. Cannot exceed 64 characters. DisplayName string `json:"displayName,omitempty"` // EndpointMatchers: Required. Endpoint matchers associated with an - // application. A combination of hostname and ports as endpoint matcher is used - // to match the application. Match conditions for OR logic. An array of match - // conditions to allow for multiple matching criteria. The rule is considered a - // match if one the conditions are met. The conditions can be one of the - // following combination (Hostname), (Hostname & Ports) EXAMPLES: Hostname - - // ("*.abc.com"), ("xyz.abc.com") Hostname and Ports - ("abc.com" and "22"), - // ("abc.com" and "22,33") etc + // application. A combination of hostname and ports as endpoint matchers is + // used to match the application. Match conditions for OR logic. An array of + // match conditions to allow for multiple matching criteria. The rule is + // considered a match if one of the conditions is met. The conditions can be + // one of the following combinations (Hostname), (Hostname & Ports) EXAMPLES: + // Hostname - ("*.example.com"), ("xyz.example.com") Hostname and Ports - + // ("example.com" and "22"), ("example.com" and "22,33") etc EndpointMatchers []*GoogleCloudBeyondcorpSecuritygatewaysV1EndpointMatcher `json:"endpointMatchers,omitempty"` // Name: Identifier. Name of the resource. Name string `json:"name,omitempty"` @@ -1815,8 +1815,8 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1ListSecurityGatewaysResponse) Mar return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpSecuritygatewaysV1SecurityGateway: Information about a -// BeyondCorp SecurityGateway resource. +// GoogleCloudBeyondcorpSecuritygatewaysV1SecurityGateway: The information +// about a security gateway resource. type GoogleCloudBeyondcorpSecuritygatewaysV1SecurityGateway struct { // CreateTime: Output only. Timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` @@ -1842,8 +1842,7 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1SecurityGateway struct { // "UPDATING" - SecurityGateway is being updated. // "DELETING" - SecurityGateway is being deleted. // "RUNNING" - SecurityGateway is running. - // "DOWN" - SecurityGateway is down and may be restored in the future. This - // happens when CCFE sends ProjectState = OFF. + // "DOWN" - SecurityGateway is down and may be restored in the future. // "ERROR" - SecurityGateway encountered an error and is in an // indeterministic state. State string `json:"state,omitempty"` @@ -7176,7 +7175,7 @@ type ProjectsLocationsSecurityGatewaysCreateCall struct { header_ http.Header } -// Create: Creates a new SecurityGateway in a given project and location. +// Create: Creates a new Security Gateway in a given project and location. // // - parent: The resource project name of the SecurityGateway location using // the form: `projects/{project_id}/locations/{location_id}`. @@ -7189,9 +7188,9 @@ func (r *ProjectsLocationsSecurityGatewaysService) Create(parent string, googlec // RequestId sets the optional parameter "requestId": An optional request ID to // identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore request if it has already been -// completed. The server will guarantee that for at least 60 minutes since the -// first request. +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. func (c *ProjectsLocationsSecurityGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysCreateCall { c.urlParams_.Set("requestId", requestId) return c @@ -8305,7 +8304,7 @@ type ProjectsLocationsSecurityGatewaysApplicationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Application. +// Delete: Deletes a single application. // // - name: Name of the resource. func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Delete(name string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index 0fa58ac0e1..865619acdf 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -2880,7 +2880,7 @@ "securityGateways": { "methods": { "create": { - "description": "Creates a new SecurityGateway in a given project and location.", + "description": "Creates a new Security Gateway in a given project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways", "httpMethod": "POST", "id": "beyondcorp.projects.locations.securityGateways.create", @@ -2896,7 +2896,7 @@ "type": "string" }, "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.", "location": "query", "type": "string" }, @@ -3192,7 +3192,7 @@ ] }, "delete": { - "description": "Deletes a single Application.", + "description": "Deletes a single application.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications/{applicationsId}", "httpMethod": "DELETE", "id": "beyondcorp.projects.locations.securityGateways.applications.delete", @@ -3432,7 +3432,7 @@ } } }, - "revision": "20250714", + "revision": "20250723", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -5479,7 +5479,7 @@ "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication": { - "description": "A Beyondcorp Application resource information.", + "description": "The information about an application resource.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication", "properties": { "createTime": { @@ -5489,11 +5489,11 @@ "type": "string" }, "displayName": { - "description": "Optional. An arbitrary user-provided name for the Application resource. Cannot exceed 64 characters.", + "description": "Optional. An arbitrary user-provided name for the application resource. Cannot exceed 64 characters.", "type": "string" }, "endpointMatchers": { - "description": "Required. Endpoint matchers associated with an application. A combination of hostname and ports as endpoint matcher is used to match the application. Match conditions for OR logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if one the conditions are met. The conditions can be one of the following combination (Hostname), (Hostname \u0026 Ports) EXAMPLES: Hostname - (\"*.abc.com\"), (\"xyz.abc.com\") Hostname and Ports - (\"abc.com\" and \"22\"), (\"abc.com\" and \"22,33\") etc", + "description": "Required. Endpoint matchers associated with an application. A combination of hostname and ports as endpoint matchers is used to match the application. Match conditions for OR logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if one of the conditions is met. The conditions can be one of the following combinations (Hostname), (Hostname \u0026 Ports) EXAMPLES: Hostname - (\"*.example.com\"), (\"xyz.example.com\") Hostname and Ports - (\"example.com\" and \"22\"), (\"example.com\" and \"22,33\") etc", "items": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher" }, @@ -5655,7 +5655,7 @@ "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway": { - "description": "Information about a BeyondCorp SecurityGateway resource.", + "description": "The information about a security gateway resource.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway", "properties": { "createTime": { @@ -5709,7 +5709,7 @@ "SecurityGateway is being updated.", "SecurityGateway is being deleted.", "SecurityGateway is running.", - "SecurityGateway is down and may be restored in the future. This happens when CCFE sends ProjectState = OFF.", + "SecurityGateway is down and may be restored in the future.", "SecurityGateway encountered an error and is in an indeterministic state." ], "readOnly": true, diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index c74c3202f3..3721e12037 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -2555,22 +2555,22 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1SecurityGatewayOperationMetadata) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication: A Beyondcorp -// Application resource information. +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication: The information +// about an application resource. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication struct { // CreateTime: Output only. Timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` - // DisplayName: Optional. An arbitrary user-provided name for the Application + // DisplayName: Optional. An arbitrary user-provided name for the application // resource. Cannot exceed 64 characters. DisplayName string `json:"displayName,omitempty"` // EndpointMatchers: Required. Endpoint matchers associated with an - // application. A combination of hostname and ports as endpoint matcher is used - // to match the application. Match conditions for OR logic. An array of match - // conditions to allow for multiple matching criteria. The rule is considered a - // match if one the conditions are met. The conditions can be one of the - // following combination (Hostname), (Hostname & Ports) EXAMPLES: Hostname - - // ("*.abc.com"), ("xyz.abc.com") Hostname and Ports - ("abc.com" and "22"), - // ("abc.com" and "22,33") etc + // application. A combination of hostname and ports as endpoint matchers is + // used to match the application. Match conditions for OR logic. An array of + // match conditions to allow for multiple matching criteria. The rule is + // considered a match if one of the conditions is met. The conditions can be + // one of the following combinations (Hostname), (Hostname & Ports) EXAMPLES: + // Hostname - ("*.example.com"), ("xyz.example.com") Hostname and Ports - + // ("example.com" and "22"), ("example.com" and "22,33") etc EndpointMatchers []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher `json:"endpointMatchers,omitempty"` // Name: Identifier. Name of the resource. Name string `json:"name,omitempty"` @@ -2804,8 +2804,8 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway: Information -// about a BeyondCorp SecurityGateway resource. +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway: The information +// about a security gateway resource. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway struct { // CreateTime: Output only. Timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` @@ -2831,8 +2831,7 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway struct { // "UPDATING" - SecurityGateway is being updated. // "DELETING" - SecurityGateway is being deleted. // "RUNNING" - SecurityGateway is running. - // "DOWN" - SecurityGateway is down and may be restored in the future. This - // happens when CCFE sends ProjectState = OFF. + // "DOWN" - SecurityGateway is down and may be restored in the future. // "ERROR" - SecurityGateway encountered an error and is in an // indeterministic state. State string `json:"state,omitempty"` @@ -13671,7 +13670,7 @@ type ProjectsLocationsSecurityGatewaysCreateCall struct { header_ http.Header } -// Create: Creates a new SecurityGateway in a given project and location. +// Create: Creates a new Security Gateway in a given project and location. // // - parent: The resource project name of the SecurityGateway location using // the form: `projects/{project_id}/locations/{location_id}`. @@ -13684,9 +13683,9 @@ func (r *ProjectsLocationsSecurityGatewaysService) Create(parent string, googlec // RequestId sets the optional parameter "requestId": An optional request ID to // identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore request if it has already been -// completed. The server will guarantee that for at least 60 minutes since the -// first request. +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. func (c *ProjectsLocationsSecurityGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysCreateCall { c.urlParams_.Set("requestId", requestId) return c @@ -14798,7 +14797,7 @@ type ProjectsLocationsSecurityGatewaysApplicationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Application. +// Delete: Deletes a single application. // // - name: Name of the resource. func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Delete(name string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index d698d15e76..380018e39d 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -695,6 +695,23 @@ "jobId" ], "parameters": { + "formatOptions.timestampOutputFormat": { + "description": "Optional. The API output format for a timestamp. This offers more explicit control over the timestamp output format as compared to the existing `use_int64_timestamp` option.", + "enum": [ + "TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED", + "FLOAT64", + "INT64", + "ISO8601_STRING" + ], + "enumDescriptions": [ + "Corresponds to default API output behavior, which is FLOAT64.", + "Timestamp is output as float64 seconds since Unix epoch.", + "Timestamp is output as int64 microseconds since Unix epoch.", + "Timestamp is output as ISO 8601 String (\"YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ\")." + ], + "location": "query", + "type": "string" + }, "formatOptions.useInt64Timestamp": { "description": "Optional. Output timestamp as usec int64. Default is false.", "location": "query", @@ -1910,6 +1927,23 @@ "required": true, "type": "string" }, + "formatOptions.timestampOutputFormat": { + "description": "Optional. The API output format for a timestamp. This offers more explicit control over the timestamp output format as compared to the existing `use_int64_timestamp` option.", + "enum": [ + "TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED", + "FLOAT64", + "INT64", + "ISO8601_STRING" + ], + "enumDescriptions": [ + "Corresponds to default API output behavior, which is FLOAT64.", + "Timestamp is output as float64 seconds since Unix epoch.", + "Timestamp is output as int64 microseconds since Unix epoch.", + "Timestamp is output as ISO 8601 String (\"YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ\")." + ], + "location": "query", + "type": "string" + }, "formatOptions.useInt64Timestamp": { "description": "Optional. Output timestamp as usec int64. Default is false.", "location": "query", @@ -2345,7 +2379,7 @@ } } }, - "revision": "20250706", + "revision": "20250713", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -3497,6 +3531,22 @@ "description": "Options for data format adjustments.", "id": "DataFormatOptions", "properties": { + "timestampOutputFormat": { + "description": "Optional. The API output format for a timestamp. This offers more explicit control over the timestamp output format as compared to the existing `use_int64_timestamp` option.", + "enum": [ + "TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED", + "FLOAT64", + "INT64", + "ISO8601_STRING" + ], + "enumDescriptions": [ + "Corresponds to default API output behavior, which is FLOAT64.", + "Timestamp is output as float64 seconds since Unix epoch.", + "Timestamp is output as int64 microseconds since Unix epoch.", + "Timestamp is output as ISO 8601 String (\"YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ\")." + ], + "type": "string" + }, "useInt64Timestamp": { "description": "Optional. Output timestamp as usec int64. Default is false.", "type": "boolean" @@ -4609,12 +4659,12 @@ "id": "ExternalRuntimeOptions", "properties": { "containerCpu": { - "description": "Optional. Amount of CPU provisioned for the container instance. If not specified, the default value is 0.33 vCPUs.", + "description": "Optional. Amount of CPU provisioned for a Python UDF container instance. For more information, see [Configure container limits for Python UDFs](https://cloud.google.com/bigquery/docs/user-defined-functions-python#configure-container-limits)", "format": "double", "type": "number" }, "containerMemory": { - "description": "Optional. Amount of memory provisioned for the container instance. Format: {number}{unit} where unit is one of \"M\", \"G\", \"Mi\" and \"Gi\" (e.g. 1G, 512Mi). If not specified, the default value is 512Mi.", + "description": "Optional. Amount of memory provisioned for a Python UDF container instance. Format: {number}{unit} where unit is one of \"M\", \"G\", \"Mi\" and \"Gi\" (e.g. 1G, 512Mi). If not specified, the default value is 512Mi. For more information, see [Configure container limits for Python UDFs](https://cloud.google.com/bigquery/docs/user-defined-functions-python#configure-container-limits)", "type": "string" }, "maxBatchingRows": { @@ -4627,7 +4677,7 @@ "type": "string" }, "runtimeVersion": { - "description": "Optional. Language runtime version (e.g. python-3.11).", + "description": "Optional. Language runtime version. Example: `python-3.11`.", "type": "string" } }, @@ -7541,11 +7591,11 @@ "id": "PythonOptions", "properties": { "entryPoint": { - "description": "Required. The entry point function in the user's Python code.", + "description": "Required. The name of the function defined in Python code as the entry point when the Python UDF is invoked.", "type": "string" }, "packages": { - "description": "Optional. A list of package names along with versions to be installed. Follows requirements.txt syntax (e.g. numpy==2.0, permutation, urllib3\u003c2.2.1)", + "description": "Optional. A list of Python package names along with versions to be installed. Example: [\"pandas\u003e=2.1\", \"google-cloud-translate==3.11\"]. For more information, see [Use third-party packages](https://cloud.google.com/bigquery/docs/user-defined-functions-python#third-party-packages).", "items": { "type": "string" }, @@ -7623,6 +7673,12 @@ }, "type": "array" }, + "timestampPrecision": { + "default": "6", + "description": "Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)", + "format": "int64", + "type": "string" + }, "type": { "description": "Required. The top level type of this field.", "type": "string" @@ -8244,7 +8300,7 @@ }, "pythonOptions": { "$ref": "PythonOptions", - "description": "Optional. Options for Python UDF. [Preview](https://cloud.google.com/products/#product-launch-stages)" + "description": "Optional. Options for the Python UDF. [Preview](https://cloud.google.com/products/#product-launch-stages)" }, "remoteFunctionOptions": { "$ref": "RemoteFunctionOptions", diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 8d29993a5b..69e2f55a17 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -1902,18 +1902,30 @@ func (s CsvOptions) MarshalJSON() ([]byte, error) { // DataFormatOptions: Options for data format adjustments. type DataFormatOptions struct { + // TimestampOutputFormat: Optional. The API output format for a timestamp. This + // offers more explicit control over the timestamp output format as compared to + // the existing `use_int64_timestamp` option. + // + // Possible values: + // "TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED" - Corresponds to default API output + // behavior, which is FLOAT64. + // "FLOAT64" - Timestamp is output as float64 seconds since Unix epoch. + // "INT64" - Timestamp is output as int64 microseconds since Unix epoch. + // "ISO8601_STRING" - Timestamp is output as ISO 8601 String + // ("YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ"). + TimestampOutputFormat string `json:"timestampOutputFormat,omitempty"` // UseInt64Timestamp: Optional. Output timestamp as usec int64. Default is // false. UseInt64Timestamp bool `json:"useInt64Timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "UseInt64Timestamp") to + // ForceSendFields is a list of field names (e.g. "TimestampOutputFormat") 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. "UseInt64Timestamp") 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. "TimestampOutputFormat") 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:"-"` } @@ -3394,12 +3406,16 @@ func (s ExternalDatasetReference) MarshalJSON() ([]byte, error) { // ExternalRuntimeOptions: Options for the runtime of the external system. type ExternalRuntimeOptions struct { - // ContainerCpu: Optional. Amount of CPU provisioned for the container - // instance. If not specified, the default value is 0.33 vCPUs. + // ContainerCpu: Optional. Amount of CPU provisioned for a Python UDF container + // instance. For more information, see Configure container limits for Python + // UDFs + // (https://cloud.google.com/bigquery/docs/user-defined-functions-python#configure-container-limits) ContainerCpu float64 `json:"containerCpu,omitempty"` - // ContainerMemory: Optional. Amount of memory provisioned for the container - // instance. Format: {number}{unit} where unit is one of "M", "G", "Mi" and - // "Gi" (e.g. 1G, 512Mi). If not specified, the default value is 512Mi. + // ContainerMemory: Optional. Amount of memory provisioned for a Python UDF + // container instance. Format: {number}{unit} where unit is one of "M", "G", + // "Mi" and "Gi" (e.g. 1G, 512Mi). If not specified, the default value is + // 512Mi. For more information, see Configure container limits for Python UDFs + // (https://cloud.google.com/bigquery/docs/user-defined-functions-python#configure-container-limits) ContainerMemory string `json:"containerMemory,omitempty"` // MaxBatchingRows: Optional. Maximum number of rows in each batch sent to the // external runtime. If absent or if 0, BigQuery dynamically decides the number @@ -3410,7 +3426,7 @@ type ExternalRuntimeOptions struct { // ``"projects/{project_id}/locations/{location_id}/connections/{connection_id} // "`` RuntimeConnection string `json:"runtimeConnection,omitempty"` - // RuntimeVersion: Optional. Language runtime version (e.g. python-3.11). + // RuntimeVersion: Optional. Language runtime version. Example: `python-3.11`. RuntimeVersion string `json:"runtimeVersion,omitempty"` // ForceSendFields is a list of field names (e.g. "ContainerCpu") to // unconditionally include in API requests. By default, fields with empty or @@ -6930,11 +6946,13 @@ func (s ProjectReference) MarshalJSON() ([]byte, error) { // PythonOptions: Options for a user-defined Python function. type PythonOptions struct { - // EntryPoint: Required. The entry point function in the user's Python code. + // EntryPoint: Required. The name of the function defined in Python code as the + // entry point when the Python UDF is invoked. EntryPoint string `json:"entryPoint,omitempty"` - // Packages: Optional. A list of package names along with versions to be - // installed. Follows requirements.txt syntax (e.g. numpy==2.0, permutation, - // urllib3<2.2.1) + // Packages: Optional. A list of Python package names along with versions to be + // installed. Example: ["pandas>=2.1", "google-cloud-translate==3.11"]. For + // more information, see Use third-party packages + // (https://cloud.google.com/bigquery/docs/user-defined-functions-python#third-party-packages). Packages []string `json:"packages,omitempty"` // ForceSendFields is a list of field names (e.g. "EntryPoint") to // unconditionally include in API requests. By default, fields with empty or @@ -7013,6 +7031,13 @@ type QueryParameterType struct { // StructTypes: Optional. The types of the fields of this struct, in order, if // this is a struct. StructTypes []*QueryParameterTypeStructTypes `json:"structTypes,omitempty"` + // TimestampPrecision: Optional. Precision (maximum number of total digits in + // base 10) for seconds of TIMESTAMP type. Possible values include: * 6 + // (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP + // type with picosecond precision) + // + // Default: 6 + TimestampPrecision *int64 `json:"timestampPrecision,omitempty,string"` // Type: Required. The top level type of this field. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "ArrayType") to @@ -7776,7 +7801,7 @@ type Routine struct { // LastModifiedTime: Output only. The time when this routine was last modified, // in milliseconds since the epoch. LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"` - // PythonOptions: Optional. Options for Python UDF. Preview + // PythonOptions: Optional. Options for the Python UDF. Preview // (https://cloud.google.com/products/#product-launch-stages) PythonOptions *PythonOptions `json:"pythonOptions,omitempty"` // RemoteFunctionOptions: Optional. Remote function specific options. @@ -12036,6 +12061,27 @@ func (r *JobsService) GetQueryResults(projectId string, jobId string) *JobsGetQu return c } +// FormatOptionsTimestampOutputFormat sets the optional parameter +// "formatOptions.timestampOutputFormat": The API output format for a +// timestamp. This offers more explicit control over the timestamp output +// format as compared to the existing `use_int64_timestamp` option. +// +// Possible values: +// +// "TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED" - Corresponds to default API output +// +// behavior, which is FLOAT64. +// +// "FLOAT64" - Timestamp is output as float64 seconds since Unix epoch. +// "INT64" - Timestamp is output as int64 microseconds since Unix epoch. +// "ISO8601_STRING" - Timestamp is output as ISO 8601 String +// +// ("YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ"). +func (c *JobsGetQueryResultsCall) FormatOptionsTimestampOutputFormat(formatOptionsTimestampOutputFormat string) *JobsGetQueryResultsCall { + c.urlParams_.Set("formatOptions.timestampOutputFormat", formatOptionsTimestampOutputFormat) + return c +} + // FormatOptionsUseInt64Timestamp sets the optional parameter // "formatOptions.useInt64Timestamp": Output timestamp as usec int64. Default // is false. @@ -15357,6 +15403,27 @@ func (r *TabledataService) List(projectId string, datasetId string, tableId stri return c } +// FormatOptionsTimestampOutputFormat sets the optional parameter +// "formatOptions.timestampOutputFormat": The API output format for a +// timestamp. This offers more explicit control over the timestamp output +// format as compared to the existing `use_int64_timestamp` option. +// +// Possible values: +// +// "TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED" - Corresponds to default API output +// +// behavior, which is FLOAT64. +// +// "FLOAT64" - Timestamp is output as float64 seconds since Unix epoch. +// "INT64" - Timestamp is output as int64 microseconds since Unix epoch. +// "ISO8601_STRING" - Timestamp is output as ISO 8601 String +// +// ("YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ"). +func (c *TabledataListCall) FormatOptionsTimestampOutputFormat(formatOptionsTimestampOutputFormat string) *TabledataListCall { + c.urlParams_.Set("formatOptions.timestampOutputFormat", formatOptionsTimestampOutputFormat) + return c +} + // FormatOptionsUseInt64Timestamp sets the optional parameter // "formatOptions.useInt64Timestamp": Output timestamp as usec int64. Default // is false. diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index eb63b049db..5b337513fd 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -405,7 +405,7 @@ ] }, "create": { - "description": "Creates a space. Can be used to create a named space, or a group chat in `Import mode`. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) and one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces.create` - `https://www.googleapis.com/auth/chat.app.spaces` - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.spaces.create` - `https://www.googleapis.com/auth/chat.spaces` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) When authenticating as an app, the `space.customer` field must be set in the request. When authenticating as an app, the Chat app is added as a member of the space. However, unlike human authentication, the Chat app is not added as a space manager. By default, the Chat app can be removed from the space by all space members. To allow only space managers to remove the app from a space, set `space.permission_settings.manage_apps` to `managers_allowed`. Space membership upon creation depends on whether the space is created in `Import mode`: * **Import mode:** No members are created. * **All other modes:** The calling user is added as a member. This is: * The app itself when using app authentication. * The human user when using user authentication. If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name.", + "description": "Creates a space. Can be used to create a named space, or a group chat in `Import mode`. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) and one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces.create` - `https://www.googleapis.com/auth/chat.app.spaces` - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.spaces.create` - `https://www.googleapis.com/auth/chat.spaces` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) When authenticating as an app, the `space.customer` field must be set in the request. When authenticating as an app, the Chat app is added as a member of the space. However, unlike human authentication, the Chat app is not added as a space manager. By default, the Chat app can be removed from the space by all space members. To allow only space managers to remove the app from a space, set `space.permission_settings.manage_apps` to `managers_allowed`. Space membership upon creation depends on whether the space is created in `Import mode`: * **Import mode:** No members are created. * **All other modes:** The calling user is added as a member. This is: * The app itself when using app authentication. * The human user when using user authentication. If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name.", "flatPath": "v1/spaces", "httpMethod": "POST", "id": "chat.spaces.create", @@ -433,7 +433,7 @@ ] }, "delete": { - "description": "Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see [Delete a space](https://developers.google.com/workspace/chat/delete-spaces). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) and the authorization scope: - `https://www.googleapis.com/auth/chat.app.delete` (only in spaces the app created) - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.delete` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scope is used: - `https://www.googleapis.com/auth/chat.admin.delete`", + "description": "Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see [Delete a space](https://developers.google.com/workspace/chat/delete-spaces). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) and the authorization scope: - `https://www.googleapis.com/auth/chat.app.delete` (only in spaces the app created) - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.delete` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scope is used: - `https://www.googleapis.com/auth/chat.admin.delete`", "flatPath": "v1/spaces/{spacesId}", "httpMethod": "DELETE", "id": "chat.spaces.delete", @@ -558,7 +558,7 @@ ] }, "patch": { - "description": "Updates a space. For an example, see [Update a space](https://developers.google.com/workspace/chat/update-spaces). If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization might already use this display name. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) and one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.spaces` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scopes is used: - `https://www.googleapis.com/auth/chat.admin.spaces` App authentication has the following limitations: - To update either `space.predefined_permission_settings` or `space.permission_settings`, the app must be the space creator. - Updating the `space.access_settings.audience` is not supported for app authentication.", + "description": "Updates a space. For an example, see [Update a space](https://developers.google.com/workspace/chat/update-spaces). If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization might already use this display name. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) and one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.spaces` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scopes is used: - `https://www.googleapis.com/auth/chat.admin.spaces` App authentication has the following limitations: - To update either `space.predefined_permission_settings` or `space.permission_settings`, the app must be the space creator. - Updating the `space.access_settings.audience` is not supported for app authentication.", "flatPath": "v1/spaces/{spacesId}", "httpMethod": "PATCH", "id": "chat.spaces.patch", @@ -666,7 +666,7 @@ "members": { "methods": { "create": { - "description": "Creates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for other Chat apps isn't supported. When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) and the authorization scope: - `https://www.googleapis.com/auth/chat.app.memberships` - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.memberships` - `https://www.googleapis.com/auth/chat.memberships.app` (to add the calling app to the space) - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scope is used: - `https://www.googleapis.com/auth/chat.admin.memberships` App authentication is not supported for the following use cases: - Inviting users external to the Workspace organization that owns the space. - Adding a Google Group to a space. - Adding a Chat app to a space. For example usage, see: - [Invite or add a user to a space](https://developers.google.com/workspace/chat/create-members#create-user-membership). - [Invite or add a Google Group to a space](https://developers.google.com/workspace/chat/create-members#create-group-membership). - [Add the Chat app to a space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api).", + "description": "Creates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for other Chat apps isn't supported. When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) and the authorization scope: - `https://www.googleapis.com/auth/chat.app.memberships` - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.memberships` - `https://www.googleapis.com/auth/chat.memberships.app` (to add the calling app to the space) - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scope is used: - `https://www.googleapis.com/auth/chat.admin.memberships` App authentication is not supported for the following use cases: - Inviting users external to the Workspace organization that owns the space. - Adding a Google Group to a space. - Adding a Chat app to a space. For example usage, see: - [Invite or add a user to a space](https://developers.google.com/workspace/chat/create-members#create-user-membership). - [Invite or add a Google Group to a space](https://developers.google.com/workspace/chat/create-members#create-group-membership). - [Add the Chat app to a space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api).", "flatPath": "v1/spaces/{spacesId}/members", "httpMethod": "POST", "id": "chat.spaces.members.create", @@ -703,7 +703,7 @@ ] }, "delete": { - "description": "Deletes a membership. For an example, see [Remove a user or a Google Chat app from a space](https://developers.google.com/workspace/chat/delete-members). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) and the authorization scope: - `https://www.googleapis.com/auth/chat.app.memberships` - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.memberships` - `https://www.googleapis.com/auth/chat.memberships.app` (to remove the calling app from the space) - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scope is used: - `https://www.googleapis.com/auth/chat.admin.memberships` App authentication is not supported for the following use cases: - Removing a Google Group from a space. - Removing a Chat app from a space. To delete memberships for space managers, the requester must be a space manager. If you're using [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) the Chat app must be the space creator.", + "description": "Deletes a membership. For an example, see [Remove a user or a Google Chat app from a space](https://developers.google.com/workspace/chat/delete-members). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) and the authorization scope: - `https://www.googleapis.com/auth/chat.app.memberships` - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.memberships` - `https://www.googleapis.com/auth/chat.memberships.app` (to remove the calling app from the space) - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scope is used: - `https://www.googleapis.com/auth/chat.admin.memberships` App authentication is not supported for the following use cases: - Removing a Google Group from a space. - Removing a Chat app from a space. To delete memberships for space managers, the requester must be a space manager. If you're using [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) the Chat app must be the space creator.", "flatPath": "v1/spaces/{spacesId}/members/{membersId}", "httpMethod": "DELETE", "id": "chat.spaces.members.delete", @@ -834,7 +834,7 @@ ] }, "patch": { - "description": "Updates a membership. For an example, see [Update a user's membership in a space](https://developers.google.com/workspace/chat/update-members). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) and the authorization scope: - `https://www.googleapis.com/auth/chat.app.memberships` (only in spaces the app created) - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.memberships` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scope is used: - `https://www.googleapis.com/auth/chat.admin.memberships`", + "description": "Updates a membership. For an example, see [Update a user's membership in a space](https://developers.google.com/workspace/chat/update-members). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) and the authorization scope: - `https://www.googleapis.com/auth/chat.app.memberships` (only in spaces the app created) - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.memberships` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scope is used: - `https://www.googleapis.com/auth/chat.admin.memberships`", "flatPath": "v1/spaces/{spacesId}/members/{membersId}", "httpMethod": "PATCH", "id": "chat.spaces.members.patch", @@ -1528,7 +1528,7 @@ } } }, - "revision": "20250724", + "revision": "20250727", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessSettings": { @@ -1551,7 +1551,7 @@ "type": "string" }, "audience": { - "description": "Optional. The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience). Format: `audiences/{audience}` To use the default target audience for the Google Workspace organization, set to `audiences/default`. Reading the target audience supports: - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope in [Developer Preview](https://developers.google.com/workspace/preview). This field is not populated when using the `chat.bot` scope with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). Setting the target audience requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", + "description": "Optional. The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience). Format: `audiences/{audience}` To use the default target audience for the Google Workspace organization, set to `audiences/default`. Reading the target audience supports: - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope. This field is not populated when using the `chat.bot` scope with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). Setting the target audience requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "type": "string" } }, @@ -4484,8 +4484,7 @@ }, "quotedMessageMetadata": { "$ref": "QuotedMessageMetadata", - "description": "Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it.", - "readOnly": true + "description": "Optional. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it." }, "sender": { "$ref": "User", @@ -4679,14 +4678,12 @@ "id": "QuotedMessageMetadata", "properties": { "lastUpdateTime": { - "description": "Output only. The timestamp when the quoted message was created or when the quoted message was last updated.", + "description": "Required. The timestamp when the quoted message was created or when the quoted message was last updated.", "format": "google-datetime", - "readOnly": true, "type": "string" }, "name": { - "description": "Output only. Resource name of the quoted message. Format: `spaces/{space}/messages/{message}`", - "readOnly": true, + "description": "Required. Resource name of the message that is quoted. Format: `spaces/{space}/messages/{message}`", "type": "string" } }, @@ -4953,7 +4950,7 @@ "type": "string" }, "customer": { - "description": "Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and `SpaceType` is `SPACE`, otherwise should not be set. In the format `customers/{customer}`, where `customer` is the `id` from the [Admin SDK customer resource]( https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). Private apps can also use the `customers/my_customer` alias to create the space in the same Google Workspace organization as the app. For DMs, this field isn't populated. [Developer Preview](https://developers.google.com/workspace/preview).", + "description": "Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and `SpaceType` is `SPACE`, otherwise should not be set. In the format `customers/{customer}`, where `customer` is the `id` from the [Admin SDK customer resource]( https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). Private apps can also use the `customers/my_customer` alias to create the space in the same Google Workspace organization as the app. For DMs, this field isn't populated.", "type": "string" }, "displayName": { @@ -4991,10 +4988,10 @@ }, "permissionSettings": { "$ref": "PermissionSettings", - "description": "Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings. Reading and updating permission settings supports: - In [Developer Preview](https://developers.google.com/workspace/preview), [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope. Only populated and settable when the Chat app created the space. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)" + "description": "Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings. Reading and updating permission settings supports: - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope. Only populated and settable when the Chat app created the space. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)" }, "predefinedPermissionSettings": { - "description": "Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the `PermissionSettings` field. Setting predefined permission settings supports: - In [Developer Preview](https://developers.google.com/workspace/preview), [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` or `chat.app.spaces.create` scopes. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)", + "description": "Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the `PermissionSettings` field. Setting predefined permission settings supports: - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` or `chat.app.spaces.create` scopes. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)", "enum": [ "PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED", "COLLABORATION_SPACE", diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 3eae36a101..74646d33b6 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -458,9 +458,8 @@ type AccessSettings struct { // - App authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with administrator approval (https://support.google.com/a?p=chat-app-auth) - // with the `chat.app.spaces` scope in Developer Preview - // (https://developers.google.com/workspace/preview). This field is not - // populated when using the `chat.bot` scope with app authentication + // with the `chat.app.spaces` scope. This field is not populated when using the + // `chat.bot` scope with app authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). // Setting the target audience requires user authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4848,9 +4847,9 @@ type Message struct { // For details, see Send a message privately // (https://developers.google.com/workspace/chat/create-messages#private). PrivateMessageViewer *User `json:"privateMessageViewer,omitempty"` - // QuotedMessageMetadata: Output only. Information about a message that's - // quoted by a Google Chat user in a space. Google Chat users can quote a - // message to reply to it. + // QuotedMessageMetadata: Optional. Information about a message that's quoted + // by a Google Chat user in a space. Google Chat users can quote a message to + // reply to it. QuotedMessageMetadata *QuotedMessageMetadata `json:"quotedMessageMetadata,omitempty"` // Sender: Output only. The user who created the message. If your Chat app // authenticates as a user @@ -5158,10 +5157,10 @@ func (s PermissionSettings) MarshalJSON() ([]byte, error) { // QuotedMessageMetadata: Information about a quoted message. type QuotedMessageMetadata struct { - // LastUpdateTime: Output only. The timestamp when the quoted message was - // created or when the quoted message was last updated. + // LastUpdateTime: Required. The timestamp when the quoted message was created + // or when the quoted message was last updated. LastUpdateTime string `json:"lastUpdateTime,omitempty"` - // Name: Output only. Resource name of the quoted message. Format: + // Name: Required. Resource name of the message that is quoted. Format: // `spaces/{space}/messages/{message}` Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "LastUpdateTime") to @@ -5581,8 +5580,7 @@ type Space struct { // https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). // Private apps can also use the `customers/my_customer` alias to create the // space in the same Google Workspace organization as the app. For DMs, this - // field isn't populated. Developer Preview - // (https://developers.google.com/workspace/preview). + // field isn't populated. Customer string `json:"customer,omitempty"` // DisplayName: Optional. The space's display name. Required when creating a // space @@ -5630,8 +5628,7 @@ type Space struct { // PermissionSettings: Optional. Space permission settings for existing spaces. // Input for updating exact space permission settings, where existing // permission settings are replaced. Output lists current permission settings. - // Reading and updating permission settings supports: - In Developer Preview - // (https://developers.google.com/workspace/preview), App authentication + // Reading and updating permission settings supports: - App authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with administrator approval (https://support.google.com/a?p=chat-app-auth) // with the `chat.app.spaces` scope. Only populated and settable when the Chat @@ -5642,8 +5639,7 @@ type Space struct { // permission settings, input only when creating a space. If the field is not // set, a collaboration space is created. After you create the space, settings // are populated in the `PermissionSettings` field. Setting predefined - // permission settings supports: - In Developer Preview - // (https://developers.google.com/workspace/preview), App authentication + // permission settings supports: - App authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with administrator approval (https://support.google.com/a?p=chat-app-auth) // with the `chat.app.spaces` or `chat.app.spaces.create` scopes. - User @@ -7384,8 +7380,7 @@ type SpacesCreateCall struct { // authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with administrator approval (https://support.google.com/a?p=chat-app-auth) -// in Developer Preview (https://developers.google.com/workspace/preview) and -// one of the following authorization scopes: - +// and one of the following authorization scopes: - // `https://www.googleapis.com/auth/chat.app.spaces.create` - // `https://www.googleapis.com/auth/chat.app.spaces` - User authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -7520,9 +7515,9 @@ type SpacesDeleteCall struct { // authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with administrator approval (https://support.google.com/a?p=chat-app-auth) -// in Developer Preview (https://developers.google.com/workspace/preview) and -// the authorization scope: - `https://www.googleapis.com/auth/chat.app.delete` -// (only in spaces the app created) - User authentication +// and the authorization scope: - +// `https://www.googleapis.com/auth/chat.app.delete` (only in spaces the app +// created) - User authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) // with one of the following authorization scopes: - // `https://www.googleapis.com/auth/chat.delete` - @@ -8105,8 +8100,7 @@ type SpacesPatchCall struct { // authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with administrator approval (https://support.google.com/a?p=chat-app-auth) -// in Developer Preview (https://developers.google.com/workspace/preview) and -// one of the following authorization scopes: - +// and one of the following authorization scopes: - // `https://www.googleapis.com/auth/chat.app.spaces` - User authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) // with one of the following authorization scopes: - @@ -8662,8 +8656,7 @@ type SpacesMembersCreateCall struct { // authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with administrator approval (https://support.google.com/a?p=chat-app-auth) -// in Developer Preview (https://developers.google.com/workspace/preview) and -// the authorization scope: - +// and the authorization scope: - // `https://www.googleapis.com/auth/chat.app.memberships` - User authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) // with one of the following authorization scopes: - @@ -8808,8 +8801,7 @@ type SpacesMembersDeleteCall struct { // authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with administrator approval (https://support.google.com/a?p=chat-app-auth) -// in Developer Preview (https://developers.google.com/workspace/preview) and -// the authorization scope: - +// and the authorization scope: - // `https://www.googleapis.com/auth/chat.app.memberships` - User authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) // with one of the following authorization scopes: - @@ -9341,8 +9333,7 @@ type SpacesMembersPatchCall struct { // authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with administrator approval (https://support.google.com/a?p=chat-app-auth) -// in Developer Preview (https://developers.google.com/workspace/preview) and -// the authorization scope: - +// and the authorization scope: - // `https://www.googleapis.com/auth/chat.app.memberships` (only in spaces the // app created) - User authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index 8b27fc3270..c26990f7bd 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -1373,11 +1373,43 @@ } } } + }, + "thirdPartyProfileUsers": { + "methods": { + "move": { + "description": "Moves a third party chrome profile user to a destination OU. All profiles associated to that user will be moved to the destination OU.", + "flatPath": "v1/customers/{customersId}/thirdPartyProfileUsers/{thirdPartyProfileUsersId}:move", + "httpMethod": "POST", + "id": "chromemanagement.customers.thirdPartyProfileUsers.move", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: customers/{customer_id}/thirdPartyProfileUsers/{third_party_profile_user_id}", + "location": "path", + "pattern": "^customers/[^/]+/thirdPartyProfileUsers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:move", + "request": { + "$ref": "GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserRequest" + }, + "response": { + "$ref": "GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.profiles" + ] + } + } } } } }, - "revision": "20250721", + "revision": "20250730", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { @@ -5680,6 +5712,29 @@ }, "type": "object" }, + "GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserRequest": { + "description": "Request to MoveThirdPartyProfileUser method.", + "id": "GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserRequest", + "properties": { + "destinationOrgUnit": { + "description": "Required. Destination organizational unit where the third party chrome profile user will be moved to.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse": { + "description": "Response for MoveThirdPartyProfileUser method.", + "id": "GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse", + "properties": { + "thirdPartyProfileUser": { + "$ref": "GoogleChromeManagementVersionsV1ThirdPartyProfileUser", + "description": "Output only. The moved third party profile user.", + "readOnly": true + } + }, + "type": "object" + }, "GoogleChromeManagementVersionsV1ReportingData": { "description": "Reporting data of a Chrome browser profile.", "id": "GoogleChromeManagementVersionsV1ReportingData", @@ -5953,6 +6008,22 @@ }, "type": "object" }, + "GoogleChromeManagementVersionsV1ThirdPartyProfileUser": { + "description": "A representation of non-Google (third party) user that is associated with a managed Chrome profile.", + "id": "GoogleChromeManagementVersionsV1ThirdPartyProfileUser", + "properties": { + "name": { + "description": "Identifier. Format: customers/{customer_id}/thirdPartyProfileUsers/{third_party_profile_user_id}", + "type": "string" + }, + "orgUnitId": { + "description": "Output only. The ID of the organizational unit assigned to the user.", + "readOnly": true, + "type": "string" + } + }, + "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", diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index 8af3c2a0bf..227004bcf2 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -184,6 +184,7 @@ func NewCustomersService(s *Service) *CustomersService { rs.Profiles = NewCustomersProfilesService(s) rs.Reports = NewCustomersReportsService(s) rs.Telemetry = NewCustomersTelemetryService(s) + rs.ThirdPartyProfileUsers = NewCustomersThirdPartyProfileUsersService(s) return rs } @@ -197,6 +198,8 @@ type CustomersService struct { Reports *CustomersReportsService Telemetry *CustomersTelemetryService + + ThirdPartyProfileUsers *CustomersThirdPartyProfileUsersService } func NewCustomersAppsService(s *Service) *CustomersAppsService { @@ -331,6 +334,15 @@ type CustomersTelemetryUsersService struct { s *Service } +func NewCustomersThirdPartyProfileUsersService(s *Service) *CustomersThirdPartyProfileUsersService { + rs := &CustomersThirdPartyProfileUsersService{s: s} + return rs +} + +type CustomersThirdPartyProfileUsersService struct { + s *Service +} + // GoogleChromeManagementV1AndroidAppInfo: Android app information. type GoogleChromeManagementV1AndroidAppInfo struct { // Permissions: Output only. Permissions requested by an Android app. @@ -4629,6 +4641,56 @@ func (s GoogleChromeManagementVersionsV1ListChromeBrowserProfilesResponse) Marsh return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserRequest: Request to +// MoveThirdPartyProfileUser method. +type GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserRequest struct { + // DestinationOrgUnit: Required. Destination organizational unit where the + // third party chrome profile user will be moved to. + DestinationOrgUnit string `json:"destinationOrgUnit,omitempty"` + // ForceSendFields is a list of field names (e.g. "DestinationOrgUnit") 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. "DestinationOrgUnit") 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 GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse: Response +// for MoveThirdPartyProfileUser method. +type GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse struct { + // ThirdPartyProfileUser: Output only. The moved third party profile user. + ThirdPartyProfileUser *GoogleChromeManagementVersionsV1ThirdPartyProfileUser `json:"thirdPartyProfileUser,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ThirdPartyProfileUser") 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. "ThirdPartyProfileUser") 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 GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementVersionsV1ReportingData: Reporting data of a Chrome // browser profile. type GoogleChromeManagementVersionsV1ReportingData struct { @@ -4878,6 +4940,34 @@ func (s GoogleChromeManagementVersionsV1SignDataResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementVersionsV1ThirdPartyProfileUser: A representation of +// non-Google (third party) user that is associated with a managed Chrome +// profile. +type GoogleChromeManagementVersionsV1ThirdPartyProfileUser struct { + // Name: Identifier. Format: + // customers/{customer_id}/thirdPartyProfileUsers/{third_party_profile_user_id} + Name string `json:"name,omitempty"` + // OrgUnitId: Output only. The ID of the organizational unit assigned to the + // user. + OrgUnitId string `json:"orgUnitId,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 + // 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. "Name") 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 GoogleChromeManagementVersionsV1ThirdPartyProfileUser) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementVersionsV1ThirdPartyProfileUser + 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: @@ -9362,3 +9452,110 @@ func (c *CustomersTelemetryUsersListCall) Pages(ctx context.Context, f func(*Goo c.PageToken(x.NextPageToken) } } + +type CustomersThirdPartyProfileUsersMoveCall struct { + s *Service + name string + googlechromemanagementversionsv1movethirdpartyprofileuserrequest *GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Move: Moves a third party chrome profile user to a destination OU. All +// profiles associated to that user will be moved to the destination OU. +// +// - name: Format: +// customers/{customer_id}/thirdPartyProfileUsers/{third_party_profile_user_id +// }. +func (r *CustomersThirdPartyProfileUsersService) Move(name string, googlechromemanagementversionsv1movethirdpartyprofileuserrequest *GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserRequest) *CustomersThirdPartyProfileUsersMoveCall { + c := &CustomersThirdPartyProfileUsersMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlechromemanagementversionsv1movethirdpartyprofileuserrequest = googlechromemanagementversionsv1movethirdpartyprofileuserrequest + 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 *CustomersThirdPartyProfileUsersMoveCall) Fields(s ...googleapi.Field) *CustomersThirdPartyProfileUsersMoveCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *CustomersThirdPartyProfileUsersMoveCall) Context(ctx context.Context) *CustomersThirdPartyProfileUsersMoveCall { + 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 *CustomersThirdPartyProfileUsersMoveCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersThirdPartyProfileUsersMoveCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromemanagementversionsv1movethirdpartyprofileuserrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:move") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromemanagement.customers.thirdPartyProfileUsers.move", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromemanagement.customers.thirdPartyProfileUsers.move" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse.ServerResp +// onse.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 *CustomersThirdPartyProfileUsersMoveCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse, 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 := &GoogleChromeManagementVersionsV1MoveThirdPartyProfileUserResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromemanagement.customers.thirdPartyProfileUsers.move", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 6c372f21cb..de38b442e6 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -3245,6 +3245,7 @@ "disk": { "description": "Name of the persistent disk to delete.", "location": "path", + "pattern": "\\S{1,66}", "required": true, "type": "string" }, @@ -4431,6 +4432,32 @@ "https://www.googleapis.com/auth/compute" ] }, + "forceStartProgressiveRollout": { + "description": "Starts a brand new progressive rollout of hierarchical firewall policy. This API will return an error when there is an ongoing progressive rollout.", + "flatPath": "locations/global/firewallPolicies/{firewallPoliciesId}/forceStartProgressiveRollout", + "httpMethod": "POST", + "id": "compute.firewallPolicies.forceStartProgressiveRollout", + "parameterOrder": [ + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the target firewall policy.", + "location": "path", + "pattern": "(firewallPolicies/)?[0-9]{0,20}", + "required": true, + "type": "string" + } + }, + "path": "locations/global/{+firewallPolicy}/forceStartProgressiveRollout", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "get": { "description": "Returns the specified firewall policy.", "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", @@ -7341,14 +7368,14 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return, or its unique numeric identifier.", + "description": "Name of the Operations resource to return. Parent is derived from this field.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, "parentId": { - "description": "Parent ID for this request.", + "description": "Parent ID for this request. Not used. Parent is derived from resource_id.", "location": "query", "type": "string" } @@ -7624,6 +7651,60 @@ } } }, + "haControllers": { + "methods": { + "failover": { + "description": "Fails over a VM targeted by the specified HaController to the selected zone.", + "flatPath": "projects/{project}/regions/{region}/haControllers/{haController}/failover", + "httpMethod": "POST", + "id": "compute.haControllers.failover", + "parameterOrder": [ + "project", + "region", + "haController" + ], + "parameters": { + "haController": { + "description": "ID of the HaController resource to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/haControllers/{haController}/failover", + "request": { + "$ref": "HaControllersFailoverRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "healthChecks": { "methods": { "aggregatedList": { @@ -8834,10 +8915,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" + "https://www.googleapis.com/auth/compute" ] }, "list": { @@ -25375,7 +25453,7 @@ "type": "string" }, "snapshotName": { - "description": "Name of the snapshot after the recovery The name will be 1-63 characters long, and comply with RFC1035. Specifically, the name will be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character will be a lowercase letter, and all following characters can be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Optional. Name of the snapshot after the recovery The name will be 1-63 characters long, and comply with RFC1035. Specifically, the name will be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character will be a lowercase letter, and all following characters can be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "location": "query", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" @@ -28049,6 +28127,7 @@ "disk": { "description": "Name of the regional persistent disk to delete.", "location": "path", + "pattern": "\\S{1,66}", "required": true, "type": "string" }, @@ -50349,6 +50428,253 @@ } } }, + "zoneVmExtensionPolicies": { + "methods": { + "delete": { + "description": "Deletes a specified zone VM extension policy.", + "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", + "httpMethod": "DELETE", + "id": "compute.zoneVmExtensionPolicies.delete", + "parameterOrder": [ + "project", + "zone", + "vmExtensionPolicy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "vmExtensionPolicy": { + "description": "Name of the zone VM extension policy to delete.", + "location": "path", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Retrieves details of a specific zone VM extension policy.", + "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", + "httpMethod": "GET", + "id": "compute.zoneVmExtensionPolicies.get", + "parameterOrder": [ + "project", + "zone", + "vmExtensionPolicy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "vmExtensionPolicy": { + "description": "Name of the VM extension policy resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", + "response": { + "$ref": "VmExtensionPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a new zone-level VM extension policy within a project.", + "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies", + "httpMethod": "POST", + "id": "compute.zoneVmExtensionPolicies.insert", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/vmExtensionPolicies", + "request": { + "$ref": "VmExtensionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists all VM extension policies within a specific zone for a project.", + "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies", + "httpMethod": "GET", + "id": "compute.zoneVmExtensionPolicies.list", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/vmExtensionPolicies", + "response": { + "$ref": "VmExtensionPolicyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "update": { + "description": "Modifies an existing zone VM extension policy.", + "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", + "httpMethod": "PATCH", + "id": "compute.zoneVmExtensionPolicies.update", + "parameterOrder": [ + "project", + "zone", + "vmExtensionPolicy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "vmExtensionPolicy": { + "description": "Name of the zone VM extension policy to update.", + "location": "path", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", + "request": { + "$ref": "VmExtensionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "zones": { "methods": { "get": { @@ -50444,7 +50770,7 @@ } } }, - "revision": "20250717", + "revision": "20250728", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -51190,10 +51516,13 @@ "purpose": { "description": "The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose. ", "enum": [ + "APPLICATION_AND_PROXY_LOAD_BALANCERS", "DNS_RESOLVER", "GCE_ENDPOINT", "IPSEC_INTERCONNECT", "NAT_AUTO", + "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0", + "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1", "PRIVATE_SERVICE_CONNECT", "SERVERLESS", "SHARED_LOADBALANCER_VIP", @@ -51201,10 +51530,13 @@ "VPC_PEERING" ], "enumDescriptions": [ + "The global external address can only be assigned to Global External Application or Proxy Load Balancer forwarding rules. This is the default value for global external addresses.", "DNS resolver address in the subnetwork.", "VM internal/alias IP, Internal LB service IP, etc.", "A regional internal IP address range reserved for the VLAN attachment that is used in HA VPN over Cloud Interconnect. This regional internal IP address range must not overlap with any IP address range of subnet/route in the VPC network and its peering networks. After the VLAN attachment is created with the reserved IP address range, when creating a new VPN gateway, its interface IP address is allocated from the associated VLAN attachment’s IP address range.", "External IP automatically reserved for Cloud NAT.", + "The global external address can only be assigned to Global External Passthrough Network Load Balancer forwarding rules, as an Availability Group 0 address.", + "The global external address can only be assigned to Global External Passthrough Network Load Balancer forwarding rules, as an Availability Group 1 address.", "A private network IP address that can be used to configure Private Service Connect. This purpose can be specified only for GLOBAL addresses of Type INTERNAL", "A regional internal IP address range reserved for Serverless.", "A private network IP address that can be shared by multiple Internal Load Balancer forwarding rules.", @@ -53479,6 +53811,10 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "params": { + "$ref": "BackendBucketParams", + "description": "Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload." + }, "region": { "description": "[Output Only] URL of the region where the regional backend bucket resides. This field is not applicable to global backend buckets. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", "type": "string" @@ -53940,6 +54276,20 @@ }, "type": "object" }, + "BackendBucketParams": { + "description": "Additional Backend Bucket parameters.", + "id": "BackendBucketParams", + "properties": { + "resourceManagerTags": { + "additionalProperties": { + "type": "string" + }, + "description": "Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"} * {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"} Note: * Invalid combinations of ID \u0026 namespaced format is not supported. For instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", + "type": "object" + } + }, + "type": "object" + }, "BackendBucketUsedBy": { "id": "BackendBucketUsedBy", "properties": { @@ -53964,7 +54314,7 @@ "type": "number" }, "name": { - "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", + "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", "type": "string" } }, @@ -53979,6 +54329,10 @@ "format": "int32", "type": "integer" }, + "allowMultinetwork": { + "description": "A boolean flag enabling multi-network mesh. This field is only allowed with load balancing scheme set to INTERNAL_SELF_MANAGED.", + "type": "boolean" + }, "backends": { "description": "The list of backends that serve this BackendService.", "items": { @@ -54132,6 +54486,7 @@ "enum": [ "EXTERNAL", "EXTERNAL_MANAGED", + "EXTERNAL_PASSTHROUGH", "INTERNAL", "INTERNAL_MANAGED", "INTERNAL_SELF_MANAGED", @@ -54140,6 +54495,7 @@ "enumDescriptions": [ "Signifies that this will be used for classic Application Load Balancers, global external proxy Network Load Balancers, or external passthrough Network Load Balancers.", "Signifies that this will be used for global external Application Load Balancers, regional external Application Load Balancers, or regional external proxy Network Load Balancers.", + "Signifies that this will be used for global external passthrough Network Load Balancers.", "Signifies that this will be used for internal passthrough Network Load Balancers.", "Signifies that this will be used for internal Application Load Balancers.", "Signifies that this will be used by Traffic Director.", @@ -54155,7 +54511,7 @@ "type": "array" }, "localityLbPolicy": { - "description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.", + "description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.", "enum": [ "INVALID_LB_POLICY", "LEAST_REQUEST", @@ -54176,7 +54532,7 @@ "The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.", "This is a simple policy in which each healthy backend is selected in round robin order. This is the default.", "Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weighted based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. This option is only supported in Network Load Balancing.", - "Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field X-Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the backends[].customMetrics fields." + "Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics fields." ], "type": "string" }, @@ -54212,6 +54568,10 @@ "$ref": "OutlierDetection", "description": "Settings controlling the ejection of unhealthy backend endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered disabled. Results of the outlier detection algorithm (ejection of endpoints from the load balancing pool and returning them back to the pool) are executed independently by each proxy instance of the load balancer. In most cases, more than one proxy instance handles the traffic received by a backend service. Thus, it is possible that an unhealthy endpoint is detected and ejected by only some of the proxies, and while this happens, other proxies may continue to send requests to the same unhealthy endpoint until they detect and eject the unhealthy endpoint. Applicable backend endpoints can be: - VM instances in an Instance Group - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud Functions Services - Private Service Connect NEGs, that resolve to Google-managed regional API endpoints or managed services published using Private Service Connect Applicable backend service types can be: - A global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A regional backend service with the serviceProtocol set to HTTP, HTTPS, HTTP2 or H2C, and loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for Serverless NEGs. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." }, + "params": { + "$ref": "BackendServiceParams", + "description": "Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload." + }, "port": { "deprecated": true, "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For internal passthrough Network Load Balancers and external passthrough Network Load Balancers, omit port.", @@ -54671,7 +55031,7 @@ "type": "boolean" }, "name": { - "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", + "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", "type": "string" } }, @@ -55218,7 +55578,7 @@ "The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.", "This is a simple policy in which each healthy backend is selected in round robin order. This is the default.", "Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weighted based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. This option is only supported in Network Load Balancing.", - "Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field X-Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the backends[].customMetrics fields." + "Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics fields." ], "type": "string" } @@ -55316,6 +55676,20 @@ }, "type": "object" }, + "BackendServiceParams": { + "description": "Additional Backend Service parameters.", + "id": "BackendServiceParams", + "properties": { + "resourceManagerTags": { + "additionalProperties": { + "type": "string" + }, + "description": "Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"} * {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"} Note: * Invalid combinations of ID \u0026 namespaced format is not supported. For instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", + "type": "object" + } + }, + "type": "object" + }, "BackendServiceReference": { "id": "BackendServiceReference", "properties": { @@ -55838,6 +56212,14 @@ }, "type": "array" }, + "asns32": { + "description": "[Output only] ASNs in the path segment. This field is for better support of 32 bit ASNs as the other asns field suffers from overflow when the ASN is larger. When type is SEQUENCE, these are ordered.", + "items": { + "format": "uint32", + "type": "integer" + }, + "type": "array" + }, "type": { "description": "[Output only] Type of AS-PATH segment (SEQUENCE or SET)", "enum": [ @@ -56564,10 +56946,12 @@ "description": "The minimum time duration that you commit to purchasing resources. The plan that you choose determines the preset term length of the commitment (which is 1 year or 3 years) and affects the discount rate that you receive for your resources. Committing to a longer time duration typically gives you a higher discount rate. The supported values for this field are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).", "enum": [ "INVALID", + "SIXTY_MONTH", "THIRTY_SIX_MONTH", "TWELVE_MONTH" ], "enumDescriptions": [ + "", "", "", "" @@ -57599,7 +57983,7 @@ "CompositeHealthChecksScopedList": { "id": "CompositeHealthChecksScopedList", "properties": { - "resources": { + "compositeHealthChecks": { "description": "A list of CompositeHealthChecks contained in this scope.", "items": { "$ref": "CompositeHealthCheck" @@ -61682,7 +62066,8 @@ "type": "boolean" }, "allowPscPacketInjection": { - "description": "This is used in PSC consumer ForwardingRule to control whether the producer is allowed to inject packets into the consumer's network. If set to true, the target service attachment must have tunneling enabled and TunnelingConfig.RoutingMode set to PACKET_INJECTION Non-PSC forwarding rules should not use this field.", + "deprecated": true, + "description": "This is used in PSC consumer ForwardingRule to control whether the producer is allowed to inject packets into the consumer's network. If set to true, the target service attachment must have tunneling enabled and TunnelingConfig.RoutingMode set to PACKET_INJECTION Non-PSC forwarding rules should not use this field. This field was never released to any customers and is deprecated and will be removed in the future.", "type": "boolean" }, "backendService": { @@ -61774,6 +62159,7 @@ "enum": [ "EXTERNAL", "EXTERNAL_MANAGED", + "EXTERNAL_PASSTHROUGH", "INTERNAL", "INTERNAL_MANAGED", "INTERNAL_SELF_MANAGED", @@ -61785,6 +62171,7 @@ "", "", "", + "", "" ], "type": "string" @@ -61904,6 +62291,10 @@ "target": { "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. - For load balancers, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: - vpc-sc - APIs that support VPC Service Controls. - all-apis - All supported Google APIs. - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. The target is not mutable once set as a service attachment. ", "type": "string" + }, + "trafficDisabled": { + "description": "[PSC for VPC-hosted services only] Determines if clients are allowed to access the producer service via this PSC endpoint.", + "type": "boolean" } }, "type": "object" @@ -62555,10 +62946,12 @@ "description": "Indicates if a Commitment needs to be created as part of FR delivery. If this field is not present, then no commitment needs to be created.", "enum": [ "INVALID", + "SIXTY_MONTH", "THIRTY_SIX_MONTH", "TWELVE_MONTH" ], "enumDescriptions": [ + "", "", "", "" @@ -64089,6 +64482,17 @@ }, "type": "object" }, + "HaControllersFailoverRequest": { + "id": "HaControllersFailoverRequest", + "properties": { + "primaryZone": { + "description": "Name of the destination zone for the failover.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + } + }, + "type": "object" + }, "HealthAggregationPolicy": { "description": "Represents a health aggregation policy. A health aggregation policy resource defines a policy to aggregate health. For more information, see Health checks overview.", "id": "HealthAggregationPolicy", @@ -65878,7 +66282,7 @@ "HealthSourcesScopedList": { "id": "HealthSourcesScopedList", "properties": { - "resources": { + "healthSources": { "description": "A list of HealthSources contained in this scope.", "items": { "$ref": "HealthSource" @@ -68042,6 +68446,13 @@ "description": "Specification of machine type to use. Every position inside this message is an alternative. The count specified in the shape flexibility must not exceed the number of entries in per_instance_properties or the capacity of the name_pattern, if used.", "id": "InstanceFlexibilityPolicyInstanceSelection", "properties": { + "disks": { + "description": "Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.", + "items": { + "$ref": "AttachedDisk" + }, + "type": "array" + }, "machineTypes": { "description": "Alternative machine types to use for instances that are created from these properties. This field only accepts a machine type names, for example `n2-standard-4` and not URLs or partial URLs.", "items": { @@ -71348,7 +71759,7 @@ "properties": { "requestValidForDuration": { "$ref": "Duration", - "description": "Relative deadline for waiting for capacity. Relevant only for Instances.Insert API." + "description": "Relative deadline for waiting for capacity. Relevant only for Instances.Insert and Instances.Start API." }, "resourceManagerTags": { "additionalProperties": { @@ -73702,6 +74113,7 @@ "BPS_20G", "BPS_2G", "BPS_300M", + "BPS_400G", "BPS_400M", "BPS_500M", "BPS_50G", @@ -73717,6 +74129,7 @@ "20 Gbit/s", "2 Gbit/s", "300 Mbit/s", + "400 Gbit/s", "400 Mbit/s", "500 Mbit/s", "50 Gbit/s", @@ -74521,6 +74934,7 @@ "BPS_20G", "BPS_2G", "BPS_300M", + "BPS_400G", "BPS_400M", "BPS_500M", "BPS_50G", @@ -74536,6 +74950,7 @@ "20 Gbit/s", "2 Gbit/s", "300 Mbit/s", + "400 Gbit/s", "400 Mbit/s", "500 Mbit/s", "50 Gbit/s", @@ -79969,10 +80384,6 @@ "description": "[Output only] Server-defined URL for the resource.", "type": "string" }, - "selfLinkWithId": { - "description": "[Output only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, "status": { "$ref": "MultiMigStatus" } @@ -79987,10 +80398,6 @@ "description": "[Output Only] Creation timestamp of this multi-MIG member in RFC3339 text format.", "type": "string" }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, "id": { "description": "[Output only] The unique identifier for this resource type. The server generates this identifier.", "format": "uint64", @@ -80013,10 +80420,6 @@ "description": "[Output Only] Server-defined fully-qualified URL for this resource.", "type": "string" }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, "status": { "$ref": "MultiMigMemberStatus", "description": "[Output Only] The status of this multi-MIG member" @@ -80219,9 +80622,6 @@ "MultiMigsList": { "id": "MultiMigsList", "properties": { - "etag": { - "type": "string" - }, "id": { "description": "Unique identifier for the resource; defined by the server.", "type": "string" @@ -80246,13 +80646,6 @@ "description": "[Output only] Server-defined URL for this resource.", "type": "string" }, - "unreachables": { - "description": "[Output only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, "warning": { "description": "Informational warning message.", "properties": { @@ -83391,10 +83784,13 @@ "description": "Specifies what address purposes are supported. If empty, all address purposes are supported.", "items": { "enum": [ + "APPLICATION_AND_PROXY_LOAD_BALANCERS", "DNS_RESOLVER", "GCE_ENDPOINT", "IPSEC_INTERCONNECT", "NAT_AUTO", + "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0", + "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1", "PRIVATE_SERVICE_CONNECT", "SERVERLESS", "SHARED_LOADBALANCER_VIP", @@ -83402,10 +83798,13 @@ "VPC_PEERING" ], "enumDescriptions": [ + "The global external address can only be assigned to Global External Application or Proxy Load Balancer forwarding rules. This is the default value for global external addresses.", "DNS resolver address in the subnetwork.", "VM internal/alias IP, Internal LB service IP, etc.", "A regional internal IP address range reserved for the VLAN attachment that is used in HA VPN over Cloud Interconnect. This regional internal IP address range must not overlap with any IP address range of subnet/route in the VPC network and its peering networks. After the VLAN attachment is created with the reserved IP address range, when creating a new VPN gateway, its interface IP address is allocated from the associated VLAN attachment’s IP address range.", "External IP automatically reserved for Cloud NAT.", + "The global external address can only be assigned to Global External Passthrough Network Load Balancer forwarding rules, as an Availability Group 0 address.", + "The global external address can only be assigned to Global External Passthrough Network Load Balancer forwarding rules, as an Availability Group 1 address.", "A private network IP address that can be used to configure Private Service Connect. This purpose can be specified only for GLOBAL addresses of Type INTERNAL", "A regional internal IP address range reserved for Serverless.", "A private network IP address that can be shared by multiple Internal Load Balancer forwarding rules.", @@ -88946,16 +89345,14 @@ "id": "PreviewFeatureRolloutOperation", "properties": { "rolloutInput": { - "$ref": "PreviewFeatureRolloutOperationRolloutInput" - }, - "rolloutStatus": { - "$ref": "PreviewFeatureRolloutOperationRolloutStatus", - "readOnly": true + "$ref": "PreviewFeatureRolloutOperationRolloutInput", + "description": "Input only. The input for the rollout operation." } }, "type": "object" }, "PreviewFeatureRolloutOperationRolloutInput": { + "description": "Represents the input for the rollout operation.", "id": "PreviewFeatureRolloutOperationRolloutInput", "properties": { "name": { @@ -88975,47 +89372,6 @@ "" ], "type": "string" - }, - "retryUuid": { - "description": "The UUID of the retry action. Only needed if this is a retry for an existing rollout. This can be used after the user canceled a rollout and want to retry it with no changes.", - "type": "string" - } - }, - "type": "object" - }, - "PreviewFeatureRolloutOperationRolloutStatus": { - "id": "PreviewFeatureRolloutOperationRolloutStatus", - "properties": { - "ongoingRollouts": { - "description": "Output only. The ongoing rollout resources. There can be multiple ongoing rollouts for a resource.", - "items": { - "$ref": "PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata" - }, - "readOnly": true, - "type": "array" - }, - "previousRollout": { - "$ref": "PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata", - "description": "Output only. The last completed rollout resource. This field will not be populated until the first rollout is completed.", - "readOnly": true - } - }, - "type": "object" - }, - "PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata": { - "id": "PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata", - "properties": { - "rollout": { - "description": "The name of the rollout Ex. organizations//locations/global/rollouts/ Ex. folders//locations/global/rollouts/ Ex. projects//locations/global/rollouts/.", - "type": "string" - }, - "rolloutPlan": { - "description": "The name of the rollout plan Ex. organizations//locations/global/rolloutPlans/ Ex. folders//locations/global/rolloutPlans/ Ex. projects//locations/global/rolloutPlans/.", - "type": "string" - }, - "status": { - "$ref": "PreviewFeatureStatus", - "description": "The status of the rollout." } }, "type": "object" @@ -89039,6 +89395,7 @@ "type": "object" }, "PreviewFeatureStatusReleaseStatus": { + "description": "[Output Only] The release status of the feature.", "id": "PreviewFeatureStatusReleaseStatus", "properties": { "stage": { @@ -89046,14 +89403,12 @@ "enum": [ "DEPRECATED", "GA", - "INTERNAL", "PREVIEW", "STAGE_UNSPECIFIED" ], "enumDescriptions": [ "", "", - "Exclude until there's product requirements.", "", "" ], @@ -89817,6 +90172,20 @@ }, "type": "array" }, + "purpose": { + "description": "The purpose of the public delegated prefix. This field can only be set for the top-level global public delegated prefix. It is an output-only field for the sub-delegates that inherit the value from the top-level global public delegated prefix. Once the value is set, it cannot be changed. The field cannot be set for regional public delegated prefixes. The supported values are: - APPLICATION_AND_PROXY_LOAD_BALANCERS: The global public delegated prefix can only be used by Global External Application and Proxy Load Balancers to allocate addresses for forwarding rules. This is the default value. - PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0: The global public delegated prefix can only be used by Global External Passthrough Network Load Balancers to allocate Availability Group 0 addresses for forwarding rules. - PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1: The global public delegated prefix can only be used by Global External Passthrough Network Load Balancers to allocate Availability Group 1 addresses for forwarding rules. ", + "enum": [ + "APPLICATION_AND_PROXY_LOAD_BALANCERS", + "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0", + "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" + ], + "enumDescriptions": [ + "The global public delegated prefix can only be used by Global External Application and Proxy Load Balancers to allocate addresses for forwarding rules. This is the default value.", + "The global public delegated prefix can only be used by Global External Passthrough Network Load Balancers to allocate Availability Group 0 addresses for forwarding rules.", + "The global public delegated prefix can only be used by Global External Passthrough Network Load Balancers to allocate Availability Group 1 addresses for forwarding rules." + ], + "type": "string" + }, "region": { "description": "[Output Only] URL of the region where the public delegated prefix resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", "type": "string" @@ -90227,6 +90596,20 @@ "description": "The name of the sub public delegated prefix.", "type": "string" }, + "purpose": { + "description": "[Output Only] The purpose of the sub public delegated prefix. Inherited from parent prefix.", + "enum": [ + "APPLICATION_AND_PROXY_LOAD_BALANCERS", + "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0", + "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" + ], + "enumDescriptions": [ + "The global public delegated prefix can only be used by Global External Application and Proxy Load Balancers to allocate addresses for forwarding rules. This is the default value.", + "The global public delegated prefix can only be used by Global External Passthrough Network Load Balancers to allocate Availability Group 0 addresses for forwarding rules.", + "The global public delegated prefix can only be used by Global External Passthrough Network Load Balancers to allocate Availability Group 1 addresses for forwarding rules." + ], + "type": "string" + }, "region": { "description": "[Output Only] The region of the sub public delegated prefix if it is regional. If absent, the sub prefix is global.", "type": "string" @@ -91152,6 +91535,8 @@ "REGIONAL_INTERNAL_LB_BACKEND_SERVICES", "REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES", "REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES", + "REGION_EXTERNAL_MANAGED_BACKEND_BUCKETS", + "REGION_INTERNAL_MANAGED_BACKEND_BUCKETS", "RESERVATIONS", "RESOURCE_POLICIES", "ROUTERS", @@ -91335,6 +91720,8 @@ "", "", "", + "", + "", "The total number of snapshots allowed for a single project.", "", "", @@ -94521,6 +94908,10 @@ "description": "Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources.", "id": "Reservation", "properties": { + "advancedDeploymentControl": { + "$ref": "ReservationAdvancedDeploymentControl", + "description": "Advanced control for cluster management, applicable only to DENSE deployment type reservations." + }, "aggregateReservation": { "$ref": "AllocationAggregateReservation", "description": "Reservation for aggregated resources, providing shape flexibility." @@ -94696,6 +95087,27 @@ }, "type": "object" }, + "ReservationAdvancedDeploymentControl": { + "description": "Advance control for cluster management, applicable only to DENSE deployment type reservations.", + "id": "ReservationAdvancedDeploymentControl", + "properties": { + "reservationOperationalMode": { + "description": "Indicates chosen reservation operational mode for the reservation.", + "enum": [ + "ALL_CAPACITY", + "HIGHLY_AVAILABLE_CAPACITY", + "RESERVATION_OPERATIONAL_MODE_UNSPECIFIED" + ], + "enumDescriptions": [ + "Google Cloud does not manage the failure of machines, but provides additional capacity, which is not guaranteed to be available.", + "Google Cloud manages the failure of machines to provide high availability.", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "ReservationAffinity": { "description": "Specifies the reservations that this instance can consume from.", "id": "ReservationAffinity", @@ -97054,7 +97466,7 @@ "SCHEDULED_STOP", "SHUTDOWN_DUE_TO_HOST_ERROR", "SHUTDOWN_DUE_TO_MAINTENANCE", - "SHUTDOWN_DUE_TO_POWER_EVENT", + "SHUTDOWN_DUE_TO_SHEDDING_EVENT", "USER_TERMINATED" ], "enumDescriptions": [ @@ -97071,7 +97483,7 @@ "Terminated due to scheduled stop", "Terminated due to host error", "Terminated due to maintenance", - "Terminated due to power event", + "Terminated due to shedding event", "Terminated by user" ], "type": "string" @@ -97491,11 +97903,6 @@ "type": "string" }, "tags": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, "description": "A list of instance tags to which this route applies.", "items": { "type": "string" @@ -102010,7 +102417,7 @@ "type": "string" }, "type": { - "description": "Type of the redirect action.", + "description": "Type of the redirect action. Possible values are: - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual challenge assessment. - EXTERNAL_302: redirect to a different URL via a 302 response. ", "enum": [ "EXTERNAL_302", "GOOGLE_RECAPTCHA" @@ -102228,7 +102635,7 @@ "type": "string" }, "consumerAcceptLists": { - "description": "Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks.", + "description": "Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.", "items": { "$ref": "ServiceAttachmentConsumerProjectLimit" }, @@ -102275,6 +102682,13 @@ "description": "[Output Only] Type of the resource. Always compute#serviceAttachment for service attachments.", "type": "string" }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata of the service attachment.", + "type": "object" + }, "name": { "annotations": { "required": [ @@ -102548,7 +102962,7 @@ "id": "ServiceAttachmentConsumerProjectLimit", "properties": { "connectionLimit": { - "description": "The value of the limit to set.", + "description": "The value of the limit to set. For endpoint_url, the limit should be no more than 1.", "format": "uint32", "type": "integer" }, @@ -105698,6 +106112,10 @@ "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, + "exapoolProvisionedCapacityGb": { + "$ref": "StoragePoolExapoolProvisionedCapacityGb", + "description": "[Output Only] Provisioned capacities for each SKU for this Exapool in GiB" + }, "id": { "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64", @@ -105750,7 +106168,7 @@ "compute.storagePools.insert" ] }, - "description": "Size, in GiB, of the storage pool. For more information about the size limits, see https://cloud.google.com/compute/docs/disks/storage-pools.", + "description": "Size of the storage pool in GiB. For more information about the size limits, see https://cloud.google.com/compute/docs/disks/storage-pools.", "format": "int64", "type": "string" }, @@ -105760,7 +106178,7 @@ "type": "string" }, "poolProvisionedThroughput": { - "description": "Provisioned throughput of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput.", + "description": "Provisioned throughput of the storage pool in MiB/s. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput.", "format": "int64", "type": "string" }, @@ -106063,6 +106481,28 @@ }, "type": "object" }, + "StoragePoolExapoolProvisionedCapacityGb": { + "description": "Exapool provisioned capacities for each SKU type", + "id": "StoragePoolExapoolProvisionedCapacityGb", + "properties": { + "capacityOptimized": { + "description": "Size, in GiB, of provisioned capacity-optimized capacity for this Exapool", + "format": "int64", + "type": "string" + }, + "readOptimized": { + "description": "Size, in GiB, of provisioned read-optimized capacity for this Exapool", + "format": "int64", + "type": "string" + }, + "writeOptimized": { + "description": "Size, in GiB, of provisioned write-optimized capacity for this Exapool", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "StoragePoolList": { "description": "A list of StoragePool resources.", "id": "StoragePoolList", @@ -106411,6 +106851,26 @@ "format": "int64", "type": "string" }, + "exapoolMaxReadIops": { + "description": "[Output Only] Maximum allowed read IOPS for this Exapool.", + "format": "int64", + "type": "string" + }, + "exapoolMaxReadThroughput": { + "description": "[Output Only] Maximum allowed read throughput in MiB/s for this Exapool.", + "format": "int64", + "type": "string" + }, + "exapoolMaxWriteIops": { + "description": "[Output Only] Maximum allowed write IOPS for this Exapool.", + "format": "int64", + "type": "string" + }, + "exapoolMaxWriteThroughput": { + "description": "[Output Only] Maximum allowed write throughput in MiB/s for this Exapool.", + "format": "int64", + "type": "string" + }, "lastResizeTimestamp": { "description": "[Output Only] Timestamp of the last successful resize in RFC3339 text format.", "type": "string" @@ -106421,7 +106881,7 @@ "type": "string" }, "maxTotalProvisionedDiskCapacityGb": { - "description": "[Output Only] Maximum allowed aggregate disk size in gigabytes.", + "description": "[Output Only] Maximum allowed aggregate disk size in GiB.", "format": "int64", "type": "string" }, @@ -106441,7 +106901,7 @@ "type": "string" }, "poolUsedThroughput": { - "description": "[Output Only] Sum of all the disks' provisioned throughput in MB/s.", + "description": "[Output Only] Sum of all the disks' provisioned throughput in MiB/s.", "format": "int64", "type": "string" }, @@ -106451,7 +106911,7 @@ "type": "string" }, "totalProvisionedDiskCapacityGb": { - "description": "[Output Only] Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.", + "description": "[Output Only] Sum of all the disks' provisioned capacity (in GiB) in this storage pool. A disk's provisioned capacity is the same as its total capacity.", "format": "int64", "type": "string" }, @@ -106461,7 +106921,7 @@ "type": "string" }, "totalProvisionedDiskThroughput": { - "description": "[Output Only] Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.", + "description": "[Output Only] Sum of all the disks' provisioned throughput in MiB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.", "format": "int64", "type": "string" }, @@ -107369,6 +107829,18 @@ "description": "The URL of the reserved internal range.", "type": "string" }, + "resolveSubnetMask": { + "description": "Configures subnet mask resolution for this subnetwork.", + "enum": [ + "ARP_ALL_RANGES", + "ARP_PRIMARY_RANGE" + ], + "enumDescriptions": [ + "All ranges assigned to the VM NIC will respond to ARP.", + "Only the primary range of the VM NIC will respond to ARP." + ], + "type": "string" + }, "role": { "description": "The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", "enum": [ @@ -112399,7 +112871,9 @@ "FAILURE_NETWORK", "FAILURE_NVLINK", "INFRASTRUCTURE_RELOCATION", - "MAINTENANCE_REASON_UNKNOWN" + "MAINTENANCE_REASON_UNKNOWN", + "PLANNED_NETWORK_UPDATE", + "PLANNED_UPDATE" ], "enumDescriptions": [ "Maintenance due to disk errors.", @@ -112412,7 +112886,9 @@ "Maintenance due to network errors.", "Maintenance due to NVLink failure.", "Maintenance due to infrastructure relocation.", - "Unknown maintenance reason. Do not use this value." + "Unknown maintenance reason. Do not use this value.", + "Maintenance due to planned network update.", + "Maintenance due to planned update to the instance." ], "type": "string" }, @@ -112442,11 +112918,13 @@ "type": { "description": "Defines the type of maintenance.", "enum": [ + "MULTIPLE", "SCHEDULED", "UNKNOWN_TYPE", "UNSCHEDULED" ], "enumDescriptions": [ + "Multiple maintenance types in one window. This is only intended to be used for groups.", "Scheduled maintenance (e.g. maintenance after uptime guarantee is complete).", "No type specified. Do not use this value.", "Unscheduled maintenance (e.g. emergency maintenance during uptime guarantee)." @@ -113722,6 +114200,294 @@ }, "type": "object" }, + "VmExtensionPolicy": { + "description": "Represents a VM extension policy.", + "id": "VmExtensionPolicy", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource.", + "type": "string" + }, + "extensionPolicies": { + "additionalProperties": { + "$ref": "VmExtensionPolicyExtensionPolicy" + }, + "description": "Required. A map of extension names (e.g., \"cloudops\") to their corresponding policy configurations.", + "type": "object" + }, + "globalResourceLink": { + "description": "Optional. [Output Only] Link to the global policy that manages this zone policy, if applicable.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "instanceSelectors": { + "description": "Optional. Selectors to target VMs for this policy. VMs are selected if they match *any* of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.", + "items": { + "$ref": "VmExtensionPolicyInstanceSelector" + }, + "type": "array" + }, + "kind": { + "default": "compute#vmExtensionPolicy", + "description": "[Output Only] Type of the resource. Always compute#vmExtensionPolicy.", + "type": "string" + }, + "managedByGlobal": { + "description": "Optional. [Output Only] Indicates if this policy is managed by a global policy.", + "type": "boolean" + }, + "name": { + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "priority": { + "description": "Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension. The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the more recent creation timestamp takes precedence.", + "format": "int32", + "type": "integer" + }, + "selfLink": { + "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource's resource id.", + "type": "string" + }, + "state": { + "description": "Optional. [Output Only] Current state of the policy: ACTIVE or DELETING.", + "enum": [ + "ACTIVE", + "DELETING", + "STATE_UNSPECIFIED" + ], + "enumDescriptions": [ + "The policy is active and applied to matching VMs. Newly created VMs that match the policy will also receive the extension policy.", + "The policy is in the process of being deleted. After the extension is removed from all matching VMs, the policy will be deleted.", + "Default value. Do not use." + ], + "type": "string" + }, + "updateTimestamp": { + "description": "[Output Only] Update timestamp in RFC3339 text format.", + "type": "string" + } + }, + "type": "object" + }, + "VmExtensionPolicyExtensionPolicy": { + "description": "Configuration for a specific VM extension.", + "id": "VmExtensionPolicyExtensionPolicy", + "properties": { + "pinnedVersion": { + "description": "Optional. The specific version of the extension to install. If not set, the latest version is used.", + "type": "string" + }, + "stringConfig": { + "description": "Optional. String-based configuration data for the extension.", + "type": "string" + } + }, + "type": "object" + }, + "VmExtensionPolicyInstanceSelector": { + "description": "Defines how to select VMs to apply a zone VM extension policy.", + "id": "VmExtensionPolicyInstanceSelector", + "properties": { + "labelSelector": { + "$ref": "VmExtensionPolicyLabelSelector", + "description": "Optional. LabelSelector selects VMs based on their labels." + } + }, + "type": "object" + }, + "VmExtensionPolicyLabelSelector": { + "description": "A LabelSelector is applied to a VM only if it matches all the specified labels.", + "id": "VmExtensionPolicyLabelSelector", + "properties": { + "inclusionLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A map of key-value pairs representing VM labels. VMs must have all of the labels specified in this map to be selected (logical AND). e.g. If the `inclusion_labels` are {(\"key1\", \"value1\"), (\"key2\", \"value2\")}, the VM labels must contain both (\"key1\", \"value1\") and (\"key2\", \"value2\") to be selected. If the VM labels are (\"key1\", \"value1\") and (\"something\", \"else\"), it will not be selected. If the map is empty, it's considered a match.", + "type": "object" + } + }, + "type": "object" + }, + "VmExtensionPolicyList": { + "id": "VmExtensionPolicyList", + "properties": { + "etag": { + "description": "[Output Only] Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a VmExtensionPolicy. An up-to-date fingerprint must be provided in order to update the VmExtensionPolicy. To see the latest value of the fingerprint, make a get() request to retrieve a VmExtensionPolicy.", + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "[Output Only] A list of VM extension policy resources.", + "items": { + "$ref": "VmExtensionPolicy" + }, + "type": "array" + }, + "kind": { + "default": "compute#vmExtensionPolicyList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "VpnGateway": { "description": "Represents a HA VPN gateway. HA VPN is a high-availability (HA) Cloud VPN solution that lets you securely connect your on-premises network to your Google Cloud Virtual Private Cloud network through an IPsec VPN connection in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies .", "id": "VpnGateway", diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 49092fef5d..1860e6789f 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -167,6 +167,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err s.GlobalOperations = NewGlobalOperationsService(s) s.GlobalOrganizationOperations = NewGlobalOrganizationOperationsService(s) s.GlobalPublicDelegatedPrefixes = NewGlobalPublicDelegatedPrefixesService(s) + s.HaControllers = NewHaControllersService(s) s.HealthChecks = NewHealthChecksService(s) s.HttpHealthChecks = NewHttpHealthChecksService(s) s.HttpsHealthChecks = NewHttpsHealthChecksService(s) @@ -273,6 +274,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err s.WireGroups = NewWireGroupsService(s) s.ZoneOperations = NewZoneOperationsService(s) s.ZoneQueuedResources = NewZoneQueuedResourcesService(s) + s.ZoneVmExtensionPolicies = NewZoneVmExtensionPoliciesService(s) s.Zones = NewZonesService(s) if endpoint != "" { s.BasePath = endpoint @@ -340,6 +342,8 @@ type Service struct { GlobalPublicDelegatedPrefixes *GlobalPublicDelegatedPrefixesService + HaControllers *HaControllersService + HealthChecks *HealthChecksService HttpHealthChecks *HttpHealthChecksService @@ -552,6 +556,8 @@ type Service struct { ZoneQueuedResources *ZoneQueuedResourcesService + ZoneVmExtensionPolicies *ZoneVmExtensionPoliciesService + Zones *ZonesService } @@ -751,6 +757,15 @@ type GlobalPublicDelegatedPrefixesService struct { s *Service } +func NewHaControllersService(s *Service) *HaControllersService { + rs := &HaControllersService{s: s} + return rs +} + +type HaControllersService struct { + s *Service +} + func NewHealthChecksService(s *Service) *HealthChecksService { rs := &HealthChecksService{s: s} return rs @@ -1705,6 +1720,15 @@ type ZoneQueuedResourcesService struct { s *Service } +func NewZoneVmExtensionPoliciesService(s *Service) *ZoneVmExtensionPoliciesService { + rs := &ZoneVmExtensionPoliciesService{s: s} + return rs +} + +type ZoneVmExtensionPoliciesService struct { + s *Service +} + func NewZonesService(s *Service) *ZonesService { rs := &ZonesService{s: s} return rs @@ -2488,6 +2512,9 @@ type Address struct { // Only global internal addresses can use this purpose. // // Possible values: + // "APPLICATION_AND_PROXY_LOAD_BALANCERS" - The global external address can + // only be assigned to Global External Application or Proxy Load Balancer + // forwarding rules. This is the default value for global external addresses. // "DNS_RESOLVER" - DNS resolver address in the subnetwork. // "GCE_ENDPOINT" - VM internal/alias IP, Internal LB service IP, etc. // "IPSEC_INTERCONNECT" - A regional internal IP address range reserved for @@ -2498,6 +2525,12 @@ type Address struct { // a new VPN gateway, its interface IP address is allocated from the associated // VLAN attachment’s IP address range. // "NAT_AUTO" - External IP automatically reserved for Cloud NAT. + // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0" - The global external + // address can only be assigned to Global External Passthrough Network Load + // Balancer forwarding rules, as an Availability Group 0 address. + // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - The global external + // address can only be assigned to Global External Passthrough Network Load + // Balancer forwarding rules, as an Availability Group 1 address. // "PRIVATE_SERVICE_CONNECT" - A private network IP address that can be used // to configure Private Service Connect. This purpose can be specified only for // GLOBAL addresses of Type INTERNAL @@ -5168,6 +5201,9 @@ type BackendBucket struct { // lowercase letter, or digit, except the last character, which cannot be a // dash. Name string `json:"name,omitempty"` + // Params: Input only. [Input Only] Additional params passed with the request, + // but not persisted as part of resource payload. + Params *BackendBucketParams `json:"params,omitempty"` // Region: [Output Only] URL of the region where the regional backend bucket // resides. This field is not applicable to global backend buckets. You must // specify this field as part of the HTTP request URL. It is not settable as a @@ -5727,6 +5763,36 @@ func (s BackendBucketListUsableWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BackendBucketParams: Additional Backend Bucket parameters. +type BackendBucketParams struct { + // ResourceManagerTags: Tag keys/values directly bound to this resource. Tag + // keys and values have the same definition as resource manager tags. The field + // is allowed for INSERT only. The keys/values to set on the resource should be + // specified in either ID { : } or Namespaced format { : }. For example the + // following are valid inputs: * {"tagKeys/333" : "tagValues/444", + // "tagKeys/123" : "tagValues/456"} * {"123/environment" : "production", + // "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is + // not supported. For instance: {"123/environment" : "tagValues/444"} is + // invalid. + ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") 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. "ResourceManagerTags") 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 BackendBucketParams) MarshalJSON() ([]byte, error) { + type NoMethod BackendBucketParams + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type BackendBucketUsedBy struct { // Reference: [Output Only] Server-defined URL for UrlMaps referencing that // BackendBucket. @@ -5760,7 +5826,7 @@ type BackendCustomMetric struct { MaxUtilization float64 `json:"maxUtilization,omitempty"` // Name: Name of a custom utilization signal. The name must be 1-64 characters // long and match the regular expression a-z ([-_.a-z0-9]*[a-z0-9])? which - // means the first character must be a lowercase letter, and all following + // means that the first character must be a lowercase letter, and all following // characters must be a dash, period, underscore, lowercase letter, or digit, // except the last character, which cannot be a dash, period, or underscore. // For usage guidelines, see Custom Metrics balancing mode. This field can only @@ -5822,6 +5888,9 @@ type BackendService struct { // supported when the backend service is referenced by a URL map that is bound // to target gRPC proxy that has validateForProxyless field set to true. AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` + // AllowMultinetwork: A boolean flag enabling multi-network mesh. This field is + // only allowed with load balancing scheme set to INTERNAL_SELF_MANAGED. + AllowMultinetwork bool `json:"allowMultinetwork,omitempty"` // Backends: The list of backends that serve this BackendService. Backends []*Backend `json:"backends,omitempty"` // CdnPolicy: Cloud CDN configuration for this BackendService. Only available @@ -6005,6 +6074,8 @@ type BackendService struct { // "EXTERNAL_MANAGED" - Signifies that this will be used for global external // Application Load Balancers, regional external Application Load Balancers, or // regional external proxy Network Load Balancers. + // "EXTERNAL_PASSTHROUGH" - Signifies that this will be used for global + // external passthrough Network Load Balancers. // "INTERNAL" - Signifies that this will be used for internal passthrough // Network Load Balancers. // "INTERNAL_MANAGED" - Signifies that this will be used for internal @@ -6037,18 +6108,23 @@ type BackendService struct { // MAGLEV: used as a drop in replacement for the ring hash load balancer. // Maglev is not as stable as ring hash but has faster table lookup build times // and host selection times. For more information about Maglev, see - // https://ai.google/research/pubs/pub44824 This field is applicable to either: - // - A regional backend service with the service_protocol set to HTTP, HTTPS, - // HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global - // backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, - // INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not - // configured—that is, if session affinity remains at the default value of - // NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If - // session affinity is set to a value other than NONE, then the default value - // for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported - // when the backend service is referenced by a URL map that is bound to target - // gRPC proxy that has validateForProxyless field set to true. localityLbPolicy - // cannot be specified with haPolicy. + // https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: + // Per-endpoint Weighted Round Robin Load Balancing using weights computed from + // Backend reported Custom Metrics. If set, the Backend Service responses are + // expected to contain non-standard HTTP response header field + // Endpoint-Load-Metrics. The reported metrics to use for computing the weights + // are specified via the customMetrics field. This field is applicable to + // either: - A regional backend service with the service_protocol set to HTTP, + // HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A + // global backend service with the load_balancing_scheme set to + // INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If + // sessionAffinity is not configured—that is, if session affinity remains at + // the default value of NONE—then the default value for localityLbPolicy is + // ROUND_ROBIN. If session affinity is set to a value other than NONE, then the + // default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH + // are supported when the backend service is referenced by a URL map that is + // bound to target gRPC proxy that has validateForProxyless field set to true. + // localityLbPolicy cannot be specified with haPolicy. // // Possible values: // "INVALID_LB_POLICY" @@ -6082,8 +6158,8 @@ type BackendService struct { // "WEIGHTED_ROUND_ROBIN" - Per-endpoint weighted round-robin Load Balancing // using weights computed from Backend reported Custom Metrics. If set, the // Backend Service responses are expected to contain non-standard HTTP response - // header field X-Endpoint-Load-Metrics. The reported metrics to use for - // computing the weights are specified via the backends[].customMetrics fields. + // header field Endpoint-Load-Metrics. The reported metrics to use for + // computing the weights are specified via the customMetrics fields. LocalityLbPolicy string `json:"localityLbPolicy,omitempty"` // LogConfig: This field denotes the logging options for the load balancer // traffic served by this backend service. If logging is enabled, logs will be @@ -6146,6 +6222,9 @@ type BackendService struct { // referenced by a URL map that is bound to target gRPC proxy that has // validateForProxyless field set to true. OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"` + // Params: Input only. [Input Only] Additional params passed with the request, + // but not persisted as part of resource payload. + Params *BackendServiceParams `json:"params,omitempty"` // Port: Deprecated in favor of portName. The TCP port to connect on the // backend. The default value is 80. For internal passthrough Network Load // Balancers and external passthrough Network Load Balancers, omit port. @@ -6737,7 +6816,7 @@ type BackendServiceCustomMetric struct { DryRun bool `json:"dryRun,omitempty"` // Name: Name of a custom utilization signal. The name must be 1-64 characters // long and match the regular expression a-z ([-_.a-z0-9]*[a-z0-9])? which - // means the first character must be a lowercase letter, and all following + // means that the first character must be a lowercase letter, and all following // characters must be a dash, period, underscore, lowercase letter, or digit, // except the last character, which cannot be a dash, period, or underscore. // For usage guidelines, see Custom Metrics balancing mode. This field can only @@ -7550,8 +7629,8 @@ type BackendServiceLocalityLoadBalancingPolicyConfigPolicy struct { // "WEIGHTED_ROUND_ROBIN" - Per-endpoint weighted round-robin Load Balancing // using weights computed from Backend reported Custom Metrics. If set, the // Backend Service responses are expected to contain non-standard HTTP response - // header field X-Endpoint-Load-Metrics. The reported metrics to use for - // computing the weights are specified via the backends[].customMetrics fields. + // header field Endpoint-Load-Metrics. The reported metrics to use for + // computing the weights are specified via the customMetrics fields. 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 @@ -7727,6 +7806,36 @@ func (s *BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity) Unmarshal return nil } +// BackendServiceParams: Additional Backend Service parameters. +type BackendServiceParams struct { + // ResourceManagerTags: Tag keys/values directly bound to this resource. Tag + // keys and values have the same definition as resource manager tags. The field + // is allowed for INSERT only. The keys/values to set on the resource should be + // specified in either ID { : } or Namespaced format { : }. For example the + // following are valid inputs: * {"tagKeys/333" : "tagValues/444", + // "tagKeys/123" : "tagValues/456"} * {"123/environment" : "production", + // "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is + // not supported. For instance: {"123/environment" : "tagValues/444"} is + // invalid. + ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") 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. "ResourceManagerTags") 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 BackendServiceParams) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceParams + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type BackendServiceReference struct { BackendService string `json:"backendService,omitempty"` // ForceSendFields is a list of field names (e.g. "BackendService") to @@ -8247,6 +8356,10 @@ type BgpRouteAsPath struct { // Asns: [Output only] ASNs in the path segment. When type is SEQUENCE, these // are ordered. Asns []int64 `json:"asns,omitempty"` + // Asns32: [Output only] ASNs in the path segment. This field is for better + // support of 32 bit ASNs as the other asns field suffers from overflow when + // the ASN is larger. When type is SEQUENCE, these are ordered. + Asns32 []int64 `json:"asns32,omitempty"` // Type: [Output only] Type of AS-PATH segment (SEQUENCE or SET) // // Possible values: @@ -9346,6 +9459,7 @@ type Commitment struct { // // Possible values: // "INVALID" + // "SIXTY_MONTH" // "THIRTY_SIX_MONTH" // "TWELVE_MONTH" Plan string `json:"plan,omitempty"` @@ -10376,20 +10490,21 @@ func (s CompositeHealthCheckListWarningData) MarshalJSON() ([]byte, error) { } type CompositeHealthChecksScopedList struct { - // Resources: A list of CompositeHealthChecks contained in this scope. - Resources []*CompositeHealthCheck `json:"resources,omitempty"` + // CompositeHealthChecks: A list of CompositeHealthChecks contained in this + // scope. + CompositeHealthChecks []*CompositeHealthCheck `json:"compositeHealthChecks,omitempty"` // Warning: Informational warning which replaces the list of composite health // checks when the list is empty. Warning *CompositeHealthChecksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Resources") to + // ForceSendFields is a list of field names (e.g. "CompositeHealthChecks") 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. "Resources") 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. "CompositeHealthChecks") 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:"-"` } @@ -15107,7 +15222,9 @@ type ForwardingRule struct { // control whether the producer is allowed to inject packets into the // consumer's network. If set to true, the target service attachment must have // tunneling enabled and TunnelingConfig.RoutingMode set to PACKET_INJECTION - // Non-PSC forwarding rules should not use this field. + // Non-PSC forwarding rules should not use this field. This field was never + // released to any customers and is deprecated and will be removed in the + // future. AllowPscPacketInjection bool `json:"allowPscPacketInjection,omitempty"` // BackendService: Identifies the backend service to which the forwarding rule // sends traffic. Required for internal and external passthrough Network Load @@ -15205,6 +15322,7 @@ type ForwardingRule struct { // Possible values: // "EXTERNAL" // "EXTERNAL_MANAGED" + // "EXTERNAL_PASSTHROUGH" // "INTERNAL" // "INTERNAL_MANAGED" // "INTERNAL_SELF_MANAGED" @@ -15364,6 +15482,9 @@ type ForwardingRule struct { // managed services, the target must be a service attachment. The target is not // mutable once set as a service attachment. Target string `json:"target,omitempty"` + // TrafficDisabled: [PSC for VPC-hosted services only] Determines if clients + // are allowed to access the producer service via this PSC endpoint. + TrafficDisabled bool `json:"trafficDisabled,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -16054,6 +16175,7 @@ type FutureReservationCommitmentInfo struct { // // Possible values: // "INVALID" + // "SIXTY_MONTH" // "THIRTY_SIX_MONTH" // "TWELVE_MONTH" CommitmentPlan string `json:"commitmentPlan,omitempty"` @@ -17937,6 +18059,27 @@ func (s HTTPSHealthCheck) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type HaControllersFailoverRequest struct { + // PrimaryZone: Name of the destination zone for the failover. + PrimaryZone string `json:"primaryZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrimaryZone") 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. "PrimaryZone") 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 HaControllersFailoverRequest) MarshalJSON() ([]byte, error) { + type NoMethod HaControllersFailoverRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // HealthAggregationPolicy: Represents a health aggregation policy. A health // aggregation policy resource defines a policy to aggregate health. For more // information, see Health checks overview. @@ -19794,18 +19937,18 @@ func (s HealthSourceListWarningData) MarshalJSON() ([]byte, error) { } type HealthSourcesScopedList struct { - // Resources: A list of HealthSources contained in this scope. - Resources []*HealthSource `json:"resources,omitempty"` + // HealthSources: A list of HealthSources contained in this scope. + HealthSources []*HealthSource `json:"healthSources,omitempty"` // Warning: Informational warning which replaces the list of health sources // when the list is empty. Warning *HealthSourcesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Resources") to + // ForceSendFields is a list of field names (e.g. "HealthSources") 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. "Resources") to include in API + // NullFields is a list of field names (e.g. "HealthSources") 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. @@ -22302,6 +22445,9 @@ func (s InstanceFlexibilityPolicy) MarshalJSON() ([]byte, error) { // specified in the shape flexibility must not exceed the number of entries in // per_instance_properties or the capacity of the name_pattern, if used. type InstanceFlexibilityPolicyInstanceSelection struct { + // Disks: Disks to be attached to the instances created from in this selection. + // They override the disks specified in the instance properties. + Disks []*AttachedDisk `json:"disks,omitempty"` // MachineTypes: Alternative machine types to use for instances that are // created from these properties. This field only accepts a machine type names, // for example `n2-standard-4` and not URLs or partial URLs. @@ -22310,13 +22456,13 @@ type InstanceFlexibilityPolicyInstanceSelection struct { // selections with rank are considered first, in the ascending order of the // rank. If not set, defaults to 0. Rank int64 `json:"rank,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "MachineTypes") 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. "Disks") 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. "MachineTypes") to include in API + // NullFields is a list of field names (e.g. "Disks") 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. @@ -26290,7 +26436,7 @@ func (s InstanceMoveRequest) MarshalJSON() ([]byte, error) { // InstanceParams: Additional instance params. type InstanceParams struct { // RequestValidForDuration: Relative deadline for waiting for capacity. - // Relevant only for Instances.Insert API. + // Relevant only for Instances.Insert and Instances.Start API. RequestValidForDuration *Duration `json:"requestValidForDuration,omitempty"` // ResourceManagerTags: Resource manager tags to be bound to the instance. Tag // keys and values have the same definition as resource manager tags. Keys must @@ -28849,6 +28995,7 @@ type InterconnectAttachment struct { // "BPS_20G" - 20 Gbit/s // "BPS_2G" - 2 Gbit/s // "BPS_300M" - 300 Mbit/s + // "BPS_400G" - 400 Gbit/s // "BPS_400M" - 400 Mbit/s // "BPS_500M" - 500 Mbit/s // "BPS_50G" - 50 Gbit/s @@ -29789,6 +29936,7 @@ type InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput struct // "BPS_20G" - 20 Gbit/s // "BPS_2G" - 2 Gbit/s // "BPS_300M" - 300 Mbit/s + // "BPS_400G" - 400 Gbit/s // "BPS_400M" - 400 Mbit/s // "BPS_500M" - 500 Mbit/s // "BPS_50G" - 50 Gbit/s @@ -35818,11 +35966,8 @@ type MultiMig struct { // ResourcePolicies: Resource policies for this multi-MIG. ResourcePolicies *MultiMigResourcePolicies `json:"resourcePolicies,omitempty"` // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - Status *MultiMigStatus `json:"status,omitempty"` + SelfLink string `json:"selfLink,omitempty"` + Status *MultiMigStatus `json:"status,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -35849,8 +35994,6 @@ type MultiMigMember struct { // CreationTimestamp: [Output Only] Creation timestamp of this multi-MIG member // in RFC3339 text format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` // Id: [Output only] The unique identifier for this resource type. The server // generates this identifier. Id uint64 `json:"id,omitempty,string"` @@ -35865,9 +36008,6 @@ type MultiMigMember struct { // SelfLink: [Output Only] Server-defined fully-qualified URL for this // resource. SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` // Status: [Output Only] The status of this multi-MIG member Status *MultiMigMemberStatus `json:"status,omitempty"` @@ -36120,7 +36260,6 @@ func (s MultiMigStatus) MarshalJSON() ([]byte, error) { } type MultiMigsList struct { - Etag string `json:"etag,omitempty"` // Id: Unique identifier for the resource; defined by the server. Id string `json:"id,omitempty"` // Items: A list of multi-MIGs in the specified project and region. @@ -36134,20 +36273,18 @@ type MultiMigsList struct { NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` // Warning: Informational warning message. Warning *MultiMigsListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally + // ForceSendFields is a list of field names (e.g. "Id") 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. "Etag") to include in API requests + // NullFields is a list of field names (e.g. "Id") 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. @@ -39540,6 +39677,9 @@ type NetworkProfileNetworkFeatures struct { // all address purposes are supported. // // Possible values: + // "APPLICATION_AND_PROXY_LOAD_BALANCERS" - The global external address can + // only be assigned to Global External Application or Proxy Load Balancer + // forwarding rules. This is the default value for global external addresses. // "DNS_RESOLVER" - DNS resolver address in the subnetwork. // "GCE_ENDPOINT" - VM internal/alias IP, Internal LB service IP, etc. // "IPSEC_INTERCONNECT" - A regional internal IP address range reserved for @@ -39550,6 +39690,12 @@ type NetworkProfileNetworkFeatures struct { // a new VPN gateway, its interface IP address is allocated from the associated // VLAN attachment’s IP address range. // "NAT_AUTO" - External IP automatically reserved for Cloud NAT. + // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0" - The global external + // address can only be assigned to Global External Passthrough Network Load + // Balancer forwarding rules, as an Availability Group 0 address. + // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - The global external + // address can only be assigned to Global External Passthrough Network Load + // Balancer forwarding rules, as an Availability Group 1 address. // "PRIVATE_SERVICE_CONNECT" - A private network IP address that can be used // to configure Private Service Connect. This purpose can be specified only for // GLOBAL addresses of Type INTERNAL @@ -45285,8 +45431,8 @@ func (s PreviewFeatureListWarningData) MarshalJSON() ([]byte, error) { // PreviewFeatureRolloutOperation: Represents the rollout operation type PreviewFeatureRolloutOperation struct { - RolloutInput *PreviewFeatureRolloutOperationRolloutInput `json:"rolloutInput,omitempty"` - RolloutStatus *PreviewFeatureRolloutOperationRolloutStatus `json:"rolloutStatus,omitempty"` + // RolloutInput: Input only. The input for the rollout operation. + RolloutInput *PreviewFeatureRolloutOperationRolloutInput `json:"rolloutInput,omitempty"` // ForceSendFields is a list of field names (e.g. "RolloutInput") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -45305,6 +45451,8 @@ func (s PreviewFeatureRolloutOperation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PreviewFeatureRolloutOperationRolloutInput: Represents the input for the +// rollout operation. type PreviewFeatureRolloutOperationRolloutInput struct { // Name: The name of the rollout plan Ex. // organizations//locations/global/rolloutPlans/ Ex. @@ -45318,10 +45466,6 @@ type PreviewFeatureRolloutOperationRolloutInput struct { // "ROLLOUT_PLAN_TWO_DAY_ROLLOUT" // "ROLLOUT_PLAN_UNSPECIFIED" PredefinedRolloutPlan string `json:"predefinedRolloutPlan,omitempty"` - // RetryUuid: The UUID of the retry action. Only needed if this is a retry for - // an existing rollout. This can be used after the user canceled a rollout and - // want to retry it with no changes. - RetryUuid string `json:"retryUuid,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 // omitted from API requests. See @@ -45340,62 +45484,6 @@ func (s PreviewFeatureRolloutOperationRolloutInput) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type PreviewFeatureRolloutOperationRolloutStatus struct { - // OngoingRollouts: Output only. The ongoing rollout resources. There can be - // multiple ongoing rollouts for a resource. - OngoingRollouts []*PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata `json:"ongoingRollouts,omitempty"` - // PreviousRollout: Output only. The last completed rollout resource. This - // field will not be populated until the first rollout is completed. - PreviousRollout *PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata `json:"previousRollout,omitempty"` - // ForceSendFields is a list of field names (e.g. "OngoingRollouts") 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. "OngoingRollouts") 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 PreviewFeatureRolloutOperationRolloutStatus) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureRolloutOperationRolloutStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata struct { - // Rollout: The name of the rollout Ex. - // organizations//locations/global/rollouts/ Ex. - // folders//locations/global/rollouts/ Ex. - // projects//locations/global/rollouts/. - Rollout string `json:"rollout,omitempty"` - // RolloutPlan: The name of the rollout plan Ex. - // organizations//locations/global/rolloutPlans/ Ex. - // folders//locations/global/rolloutPlans/ Ex. - // projects//locations/global/rolloutPlans/. - RolloutPlan string `json:"rolloutPlan,omitempty"` - // Status: The status of the rollout. - Status *PreviewFeatureStatus `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Rollout") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. 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. "Rollout") 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 PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // PreviewFeatureStatus: [Output Only] The status of the feature. type PreviewFeatureStatus struct { // Description: [Output Only] The description of the feature. @@ -45421,13 +45509,14 @@ func (s PreviewFeatureStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PreviewFeatureStatusReleaseStatus: [Output Only] The release status of the +// feature. type PreviewFeatureStatusReleaseStatus struct { // Stage: [Output Only] The stage of the feature. // // Possible values: // "DEPRECATED" // "GA" - // "INTERNAL" - Exclude until there's product requirements. // "PREVIEW" // "STAGE_UNSPECIFIED" Stage string `json:"stage,omitempty"` @@ -46214,6 +46303,36 @@ type PublicDelegatedPrefix struct { // PublicDelegatedSubPrefixs: The list of sub public delegated prefixes that // exist for this public delegated prefix. PublicDelegatedSubPrefixs []*PublicDelegatedPrefixPublicDelegatedSubPrefix `json:"publicDelegatedSubPrefixs,omitempty"` + // Purpose: The purpose of the public delegated prefix. This field can only be + // set for the top-level global public delegated prefix. It is an output-only + // field for the sub-delegates that inherit the value from the top-level global + // public delegated prefix. Once the value is set, it cannot be changed. The + // field cannot be set for regional public delegated prefixes. The supported + // values are: - APPLICATION_AND_PROXY_LOAD_BALANCERS: The global public + // delegated prefix can only be used by Global External Application and Proxy + // Load Balancers to allocate addresses for forwarding rules. This is the + // default value. - PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0: The global + // public delegated prefix can only be used by Global External Passthrough + // Network Load Balancers to allocate Availability Group 0 addresses for + // forwarding rules. - PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1: The + // global public delegated prefix can only be used by Global External + // Passthrough Network Load Balancers to allocate Availability Group 1 + // addresses for forwarding rules. + // + // Possible values: + // "APPLICATION_AND_PROXY_LOAD_BALANCERS" - The global public delegated + // prefix can only be used by Global External Application and Proxy Load + // Balancers to allocate addresses for forwarding rules. This is the default + // value. + // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0" - The global public + // delegated prefix can only be used by Global External Passthrough Network + // Load Balancers to allocate Availability Group 0 addresses for forwarding + // rules. + // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - The global public + // delegated prefix can only be used by Global External Passthrough Network + // Load Balancers to allocate Availability Group 1 addresses for forwarding + // rules. + Purpose string `json:"purpose,omitempty"` // Region: [Output Only] URL of the region where the public delegated prefix // resides. This field applies only to the region resource. You must specify // this field as part of the HTTP request URL. It is not settable as a field in @@ -46625,6 +46744,23 @@ type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { Mode string `json:"mode,omitempty"` // Name: The name of the sub public delegated prefix. Name string `json:"name,omitempty"` + // Purpose: [Output Only] The purpose of the sub public delegated prefix. + // Inherited from parent prefix. + // + // Possible values: + // "APPLICATION_AND_PROXY_LOAD_BALANCERS" - The global public delegated + // prefix can only be used by Global External Application and Proxy Load + // Balancers to allocate addresses for forwarding rules. This is the default + // value. + // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0" - The global public + // delegated prefix can only be used by Global External Passthrough Network + // Load Balancers to allocate Availability Group 0 addresses for forwarding + // rules. + // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - The global public + // delegated prefix can only be used by Global External Passthrough Network + // Load Balancers to allocate Availability Group 1 addresses for forwarding + // rules. + Purpose string `json:"purpose,omitempty"` // Region: [Output Only] The region of the sub public delegated prefix if it is // regional. If absent, the sub prefix is global. Region string `json:"region,omitempty"` @@ -47605,6 +47741,8 @@ type Quota struct { // "REGIONAL_INTERNAL_LB_BACKEND_SERVICES" // "REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES" // "REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES" + // "REGION_EXTERNAL_MANAGED_BACKEND_BUCKETS" + // "REGION_INTERNAL_MANAGED_BACKEND_BUCKETS" // "RESERVATIONS" // "RESOURCE_POLICIES" // "ROUTERS" @@ -51164,6 +51302,9 @@ func (s *RequestMirrorPolicy) UnmarshalJSON(data []byte) error { // capacity is held in a specific zone even if the reserved VMs are not // running. For more information, read Reserving zonal resources. type Reservation struct { + // AdvancedDeploymentControl: Advanced control for cluster management, + // applicable only to DENSE deployment type reservations. + AdvancedDeploymentControl *ReservationAdvancedDeploymentControl `json:"advancedDeploymentControl,omitempty"` // AggregateReservation: Reservation for aggregated resources, providing shape // flexibility. AggregateReservation *AllocationAggregateReservation `json:"aggregateReservation,omitempty"` @@ -51297,15 +51438,15 @@ type Reservation struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AggregateReservation") to - // unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "AdvancedDeploymentControl") + // 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. "AggregateReservation") 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. "AdvancedDeploymentControl") 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:"-"` } @@ -51315,6 +51456,37 @@ func (s Reservation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ReservationAdvancedDeploymentControl: Advance control for cluster +// management, applicable only to DENSE deployment type reservations. +type ReservationAdvancedDeploymentControl struct { + // ReservationOperationalMode: Indicates chosen reservation operational mode + // for the reservation. + // + // Possible values: + // "ALL_CAPACITY" - Google Cloud does not manage the failure of machines, but + // provides additional capacity, which is not guaranteed to be available. + // "HIGHLY_AVAILABLE_CAPACITY" - Google Cloud manages the failure of machines + // to provide high availability. + // "RESERVATION_OPERATIONAL_MODE_UNSPECIFIED" + ReservationOperationalMode string `json:"reservationOperationalMode,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReservationOperationalMode") + // 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. "ReservationOperationalMode") 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 ReservationAdvancedDeploymentControl) MarshalJSON() ([]byte, error) { + type NoMethod ReservationAdvancedDeploymentControl + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ReservationAffinity: Specifies the reservations that this instance can // consume from. type ReservationAffinity struct { @@ -53894,7 +54066,7 @@ type ResourceStatusLastInstanceTerminationDetails struct { // "SCHEDULED_STOP" - Terminated due to scheduled stop // "SHUTDOWN_DUE_TO_HOST_ERROR" - Terminated due to host error // "SHUTDOWN_DUE_TO_MAINTENANCE" - Terminated due to maintenance - // "SHUTDOWN_DUE_TO_POWER_EVENT" - Terminated due to power event + // "SHUTDOWN_DUE_TO_SHEDDING_EVENT" - Terminated due to shedding event // "USER_TERMINATED" - Terminated by user TerminationReason string `json:"terminationReason,omitempty"` // ForceSendFields is a list of field names (e.g. "TerminationReason") to @@ -59258,7 +59430,9 @@ type SecurityPolicyRuleRedirectOptions struct { // Target: Target for the redirect action. This is required if the type is // EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. Target string `json:"target,omitempty"` - // Type: Type of the redirect action. + // Type: Type of the redirect action. Possible values are: - GOOGLE_RECAPTCHA: + // redirect to reCAPTCHA for manual challenge assessment. - EXTERNAL_302: + // redirect to a different URL via a 302 response. // // Possible values: // "EXTERNAL_302" @@ -59536,7 +59710,7 @@ type ServiceAttachment struct { // connection limit. A given service attachment can manage connections at // either the project or network level. Therefore, both the accept and reject // lists for a given service attachment must contain either only projects or - // only networks. + // only networks or only endpoints. ConsumerAcceptLists []*ServiceAttachmentConsumerProjectLimit `json:"consumerAcceptLists,omitempty"` // ConsumerRejectLists: Specifies a list of projects or networks that are not // allowed to connect to this service attachment. The project can be specified @@ -59573,6 +59747,8 @@ type ServiceAttachment struct { // Kind: [Output Only] Type of the resource. Always compute#serviceAttachment // for service attachments. Kind string `json:"kind,omitempty"` + // Metadata: Metadata of the service attachment. + Metadata map[string]string `json:"metadata,omitempty"` // Name: Name of the resource. Provided by the client when the resource is // created. The name must be 1-63 characters long, and comply with RFC1035. // Specifically, the name must be 1-63 characters long and match the regular @@ -59854,7 +60030,8 @@ func (s ServiceAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { } type ServiceAttachmentConsumerProjectLimit struct { - // ConnectionLimit: The value of the limit to set. + // ConnectionLimit: The value of the limit to set. For endpoint_url, the limit + // should be no more than 1. ConnectionLimit int64 `json:"connectionLimit,omitempty"` // NetworkUrl: The network URL for the network to set the limit for. NetworkUrl string `json:"networkUrl,omitempty"` @@ -63303,6 +63480,9 @@ type StoragePool struct { // Description: An optional description of this resource. Provide this property // when you create the resource. Description string `json:"description,omitempty"` + // ExapoolProvisionedCapacityGb: [Output Only] Provisioned capacities for each + // SKU for this Exapool in GiB + ExapoolProvisionedCapacityGb *StoragePoolExapoolProvisionedCapacityGb `json:"exapoolProvisionedCapacityGb,omitempty"` // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -63338,15 +63518,15 @@ type StoragePool struct { // pool disks' exclusive use. // "UNSPECIFIED" PerformanceProvisioningType string `json:"performanceProvisioningType,omitempty"` - // PoolProvisionedCapacityGb: Size, in GiB, of the storage pool. For more + // PoolProvisionedCapacityGb: Size of the storage pool in GiB. For more // information about the size limits, see // https://cloud.google.com/compute/docs/disks/storage-pools. PoolProvisionedCapacityGb int64 `json:"poolProvisionedCapacityGb,omitempty,string"` // PoolProvisionedIops: Provisioned IOPS of the storage pool. Only relevant if // the storage pool type is hyperdisk-balanced. PoolProvisionedIops int64 `json:"poolProvisionedIops,omitempty,string"` - // PoolProvisionedThroughput: Provisioned throughput of the storage pool. Only - // relevant if the storage pool type is hyperdisk-balanced or + // PoolProvisionedThroughput: Provisioned throughput of the storage pool in + // MiB/s. Only relevant if the storage pool type is hyperdisk-balanced or // hyperdisk-throughput. PoolProvisionedThroughput int64 `json:"poolProvisionedThroughput,omitempty,string"` // ProvisionedIops: DEPRECATED -- use "pool provisioned IOPS". @@ -63615,6 +63795,36 @@ func (s StoragePoolDisk) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// StoragePoolExapoolProvisionedCapacityGb: Exapool provisioned capacities for +// each SKU type +type StoragePoolExapoolProvisionedCapacityGb struct { + // CapacityOptimized: Size, in GiB, of provisioned capacity-optimized capacity + // for this Exapool + CapacityOptimized int64 `json:"capacityOptimized,omitempty,string"` + // ReadOptimized: Size, in GiB, of provisioned read-optimized capacity for this + // Exapool + ReadOptimized int64 `json:"readOptimized,omitempty,string"` + // WriteOptimized: Size, in GiB, of provisioned write-optimized capacity for + // this Exapool + WriteOptimized int64 `json:"writeOptimized,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CapacityOptimized") 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. "CapacityOptimized") 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 StoragePoolExapoolProvisionedCapacityGb) MarshalJSON() ([]byte, error) { + type NoMethod StoragePoolExapoolProvisionedCapacityGb + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // StoragePoolList: A list of StoragePool resources. type StoragePoolList struct { Etag string `json:"etag,omitempty"` @@ -63943,13 +64153,25 @@ type StoragePoolResourceStatus struct { AggregateDiskSizeGb int64 `json:"aggregateDiskSizeGb,omitempty,string"` // DiskCount: [Output Only] Number of disks used. DiskCount int64 `json:"diskCount,omitempty,string"` + // ExapoolMaxReadIops: [Output Only] Maximum allowed read IOPS for this + // Exapool. + ExapoolMaxReadIops int64 `json:"exapoolMaxReadIops,omitempty,string"` + // ExapoolMaxReadThroughput: [Output Only] Maximum allowed read throughput in + // MiB/s for this Exapool. + ExapoolMaxReadThroughput int64 `json:"exapoolMaxReadThroughput,omitempty,string"` + // ExapoolMaxWriteIops: [Output Only] Maximum allowed write IOPS for this + // Exapool. + ExapoolMaxWriteIops int64 `json:"exapoolMaxWriteIops,omitempty,string"` + // ExapoolMaxWriteThroughput: [Output Only] Maximum allowed write throughput in + // MiB/s for this Exapool. + ExapoolMaxWriteThroughput int64 `json:"exapoolMaxWriteThroughput,omitempty,string"` // LastResizeTimestamp: [Output Only] Timestamp of the last successful resize // in RFC3339 text format. LastResizeTimestamp string `json:"lastResizeTimestamp,omitempty"` // MaxAggregateDiskSizeGb: DEPRECATED -- use "max provisioned disk size gb" MaxAggregateDiskSizeGb int64 `json:"maxAggregateDiskSizeGb,omitempty,string"` // MaxTotalProvisionedDiskCapacityGb: [Output Only] Maximum allowed aggregate - // disk size in gigabytes. + // disk size in GiB. MaxTotalProvisionedDiskCapacityGb int64 `json:"maxTotalProvisionedDiskCapacityGb,omitempty,string"` // NumberOfDisks: DEPRECATED -- use "disk count". NumberOfDisks int64 `json:"numberOfDisks,omitempty,string"` @@ -63964,20 +64186,20 @@ type StoragePoolResourceStatus struct { // https://cloud.google.com/compute/docs/disks/storage-pools. PoolUsedIops int64 `json:"poolUsedIops,omitempty,string"` // PoolUsedThroughput: [Output Only] Sum of all the disks' provisioned - // throughput in MB/s. + // throughput in MiB/s. PoolUsedThroughput int64 `json:"poolUsedThroughput,omitempty,string"` // PoolUserWrittenBytes: [Output Only] Amount of data written into the pool, // before it is compacted. PoolUserWrittenBytes int64 `json:"poolUserWrittenBytes,omitempty,string"` - // TotalProvisionedDiskCapacityGb: [Output Only] Sum of all the capacity - // provisioned in disks in this storage pool. A disk's provisioned capacity is - // the same as its total capacity. + // TotalProvisionedDiskCapacityGb: [Output Only] Sum of all the disks' + // provisioned capacity (in GiB) in this storage pool. A disk's provisioned + // capacity is the same as its total capacity. TotalProvisionedDiskCapacityGb int64 `json:"totalProvisionedDiskCapacityGb,omitempty,string"` // TotalProvisionedDiskIops: [Output Only] Sum of all the disks' provisioned // IOPS. TotalProvisionedDiskIops int64 `json:"totalProvisionedDiskIops,omitempty,string"` // TotalProvisionedDiskThroughput: [Output Only] Sum of all the disks' - // provisioned throughput in MB/s, minus some amount that is allowed per disk + // provisioned throughput in MiB/s, minus some amount that is allowed per disk // that is not counted towards pool's throughput capacity. TotalProvisionedDiskThroughput int64 `json:"totalProvisionedDiskThroughput,omitempty,string"` // UsedBytes: DEPRECATED -- use "pool used capacity". @@ -64878,6 +65100,13 @@ type Subnetwork struct { Region string `json:"region,omitempty"` // ReservedInternalRange: The URL of the reserved internal range. ReservedInternalRange string `json:"reservedInternalRange,omitempty"` + // ResolveSubnetMask: Configures subnet mask resolution for this subnetwork. + // + // Possible values: + // "ARP_ALL_RANGES" - All ranges assigned to the VM NIC will respond to ARP. + // "ARP_PRIMARY_RANGE" - Only the primary range of the VM NIC will respond to + // ARP. + ResolveSubnetMask string `json:"resolveSubnetMask,omitempty"` // Role: The role of subnetwork. Currently, this field is only used when // purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. The value // can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is @@ -70492,6 +70721,8 @@ type UpcomingMaintenance struct { // relocation. // "MAINTENANCE_REASON_UNKNOWN" - Unknown maintenance reason. Do not use this // value. + // "PLANNED_NETWORK_UPDATE" - Maintenance due to planned network update. + // "PLANNED_UPDATE" - Maintenance due to planned update to the instance. MaintenanceReasons []string `json:"maintenanceReasons,omitempty"` // Possible values: // "ONGOING" - There is ongoing maintenance on this VM. @@ -70509,6 +70740,8 @@ type UpcomingMaintenance struct { // Type: Defines the type of maintenance. // // Possible values: + // "MULTIPLE" - Multiple maintenance types in one window. This is only + // intended to be used for groups. // "SCHEDULED" - Scheduled maintenance (e.g. maintenance after uptime // guarantee is complete). // "UNKNOWN_TYPE" - No type specified. Do not use this value. @@ -71979,6 +72212,324 @@ func (s VmEndpointNatMappingsListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// VmExtensionPolicy: Represents a VM extension policy. +type VmExtensionPolicy struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + // Description: An optional description of this resource. + Description string `json:"description,omitempty"` + // ExtensionPolicies: Required. A map of extension names (e.g., "cloudops") to + // their corresponding policy configurations. + ExtensionPolicies map[string]VmExtensionPolicyExtensionPolicy `json:"extensionPolicies,omitempty"` + // GlobalResourceLink: Optional. [Output Only] Link to the global policy that + // manages this zone policy, if applicable. + GlobalResourceLink string `json:"globalResourceLink,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This identifier is + // defined by the server. + Id uint64 `json:"id,omitempty,string"` + // InstanceSelectors: Optional. Selectors to target VMs for this policy. VMs + // are selected if they match *any* of the provided selectors (logical OR). If + // this list is empty, the policy applies to all VMs. + InstanceSelectors []*VmExtensionPolicyInstanceSelector `json:"instanceSelectors,omitempty"` + // Kind: [Output Only] Type of the resource. Always compute#vmExtensionPolicy. + Kind string `json:"kind,omitempty"` + // ManagedByGlobal: Optional. [Output Only] Indicates if this policy is managed + // by a global policy. + ManagedByGlobal bool `json:"managedByGlobal,omitempty"` + // Name: Name of the resource. Provided by the client when the resource is + // created. The name must be 1-63 characters long, and comply with RFC1035. + // Specifically, the name must be 1-63 characters long and match the regular + // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must + // be a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot be a + // dash. + Name string `json:"name,omitempty"` + // Priority: Optional. Priority of this policy. Used to resolve conflicts when + // multiple policies apply to the same extension. The policy priority is an + // integer from 0 to 65535, inclusive. Lower integers indicate higher + // priorities. If you do not specify a priority when creating a rule, it is + // assigned a priority of 1000. If priorities are equal, the policy with the + // more recent creation timestamp takes precedence. + Priority int64 `json:"priority,omitempty"` + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource's + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // State: Optional. [Output Only] Current state of the policy: ACTIVE or + // DELETING. + // + // Possible values: + // "ACTIVE" - The policy is active and applied to matching VMs. Newly created + // VMs that match the policy will also receive the extension policy. + // "DELETING" - The policy is in the process of being deleted. After the + // extension is removed from all matching VMs, the policy will be deleted. + // "STATE_UNSPECIFIED" - Default value. Do not use. + State string `json:"state,omitempty"` + // UpdateTimestamp: [Output Only] Update timestamp in RFC3339 text format. + UpdateTimestamp string `json:"updateTimestamp,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") 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. "CreationTimestamp") 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 VmExtensionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod VmExtensionPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// VmExtensionPolicyExtensionPolicy: Configuration for a specific VM extension. +type VmExtensionPolicyExtensionPolicy struct { + // PinnedVersion: Optional. The specific version of the extension to install. + // If not set, the latest version is used. + PinnedVersion string `json:"pinnedVersion,omitempty"` + // StringConfig: Optional. String-based configuration data for the extension. + StringConfig string `json:"stringConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PinnedVersion") 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. "PinnedVersion") 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 VmExtensionPolicyExtensionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod VmExtensionPolicyExtensionPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// VmExtensionPolicyInstanceSelector: Defines how to select VMs to apply a zone +// VM extension policy. +type VmExtensionPolicyInstanceSelector struct { + // LabelSelector: Optional. LabelSelector selects VMs based on their labels. + LabelSelector *VmExtensionPolicyLabelSelector `json:"labelSelector,omitempty"` + // ForceSendFields is a list of field names (e.g. "LabelSelector") 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. "LabelSelector") 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 VmExtensionPolicyInstanceSelector) MarshalJSON() ([]byte, error) { + type NoMethod VmExtensionPolicyInstanceSelector + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// VmExtensionPolicyLabelSelector: A LabelSelector is applied to a VM only if +// it matches all the specified labels. +type VmExtensionPolicyLabelSelector struct { + // InclusionLabels: Optional. A map of key-value pairs representing VM labels. + // VMs must have all of the labels specified in this map to be selected + // (logical AND). e.g. If the `inclusion_labels` are {("key1", "value1"), + // ("key2", "value2")}, the VM labels must contain both ("key1", "value1") and + // ("key2", "value2") to be selected. If the VM labels are ("key1", "value1") + // and ("something", "else"), it will not be selected. If the map is empty, + // it's considered a match. + InclusionLabels map[string]string `json:"inclusionLabels,omitempty"` + // ForceSendFields is a list of field names (e.g. "InclusionLabels") 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. "InclusionLabels") 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 VmExtensionPolicyLabelSelector) MarshalJSON() ([]byte, error) { + type NoMethod VmExtensionPolicyLabelSelector + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type VmExtensionPolicyList struct { + // Etag: [Output Only] Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This field + // will be ignored when inserting a VmExtensionPolicy. An up-to-date + // fingerprint must be provided in order to update the VmExtensionPolicy. To + // see the latest value of the fingerprint, make a get() request to retrieve a + // VmExtensionPolicy. + Etag string `json:"etag,omitempty"` + // Id: [Output Only] Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + // Items: [Output Only] A list of VM extension policy resources. + Items []*VmExtensionPolicy `json:"items,omitempty"` + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will have their + // own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *VmExtensionPolicyListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 VmExtensionPolicyList) MarshalJSON() ([]byte, error) { + type NoMethod VmExtensionPolicyList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// VmExtensionPolicyListWarning: [Output Only] Informational warning message. +type VmExtensionPolicyListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*VmExtensionPolicyListWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + 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 VmExtensionPolicyListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VmExtensionPolicyListWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type VmExtensionPolicyListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 VmExtensionPolicyListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VmExtensionPolicyListWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VpnGateway: Represents a HA VPN gateway. HA VPN is a high-availability (HA) // Cloud VPN solution that lets you securely connect your on-premises network // to your Google Cloud Virtual Private Cloud network through an IPsec VPN diff --git a/compute/v0.alpha/compute2-gen.go b/compute/v0.alpha/compute2-gen.go index 476103588a..259319e24e 100644 --- a/compute/v0.alpha/compute2-gen.go +++ b/compute/v0.alpha/compute2-gen.go @@ -12885,6 +12885,105 @@ func (c *FirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } +type FirewallPoliciesForceStartProgressiveRolloutCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ForceStartProgressiveRollout: Starts a brand new progressive rollout of +// hierarchical firewall policy. This API will return an error when there is an +// ongoing progressive rollout. +// +// - firewallPolicy: Name of the target firewall policy. +func (r *FirewallPoliciesService) ForceStartProgressiveRollout(firewallPolicy string) *FirewallPoliciesForceStartProgressiveRolloutCall { + c := &FirewallPoliciesForceStartProgressiveRolloutCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + 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 *FirewallPoliciesForceStartProgressiveRolloutCall) Fields(s ...googleapi.Field) *FirewallPoliciesForceStartProgressiveRolloutCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FirewallPoliciesForceStartProgressiveRolloutCall) Context(ctx context.Context) *FirewallPoliciesForceStartProgressiveRolloutCall { + 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 *FirewallPoliciesForceStartProgressiveRolloutCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FirewallPoliciesForceStartProgressiveRolloutCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/{+firewallPolicy}/forceStartProgressiveRollout") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "firewallPolicy": c.firewallPolicy, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.forceStartProgressiveRollout", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.firewallPolicies.forceStartProgressiveRollout" 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 *FirewallPoliciesForceStartProgressiveRolloutCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.forceStartProgressiveRollout", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type FirewallPoliciesGetCall struct { s *Service firewallPolicy string @@ -22129,7 +22228,7 @@ func (c *GlobalOrganizationOperationsDeleteCall) Do(opts ...googleapi.CallOption type GlobalOrganizationOperationsGetCall struct { s *Service - operationid string + operation string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -22139,15 +22238,16 @@ type GlobalOrganizationOperationsGetCall struct { // Get: Retrieves the specified Operations resource. Gets a list of operations // by making a `list()` request. // -// - operation: Name of the Operations resource to return, or its unique -// numeric identifier. -func (r *GlobalOrganizationOperationsService) Get(operationid string) *GlobalOrganizationOperationsGetCall { +// - operation: Name of the Operations resource to return. Parent is derived +// from this field. +func (r *GlobalOrganizationOperationsService) Get(operation string) *GlobalOrganizationOperationsGetCall { c := &GlobalOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operationid = operationid + c.operation = operation return c } // ParentId sets the optional parameter "parentId": Parent ID for this request. +// Not used. Parent is derived from resource_id. func (c *GlobalOrganizationOperationsGetCall) ParentId(parentId string) *GlobalOrganizationOperationsGetCall { c.urlParams_.Set("parentId", parentId) return c @@ -22199,7 +22299,7 @@ func (c *GlobalOrganizationOperationsGetCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "operation": c.operationid, + "operation": c.operation, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -23137,6 +23237,127 @@ func (c *GlobalPublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption return ret, nil } +type HaControllersFailoverCall struct { + s *Service + project string + region string + haController string + hacontrollersfailoverrequest *HaControllersFailoverRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Failover: Fails over a VM targeted by the specified HaController to the +// selected zone. +// +// - haController: ID of the HaController resource to update. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *HaControllersService) Failover(project string, region string, haController string, hacontrollersfailoverrequest *HaControllersFailoverRequest) *HaControllersFailoverCall { + c := &HaControllersFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.haController = haController + c.hacontrollersfailoverrequest = hacontrollersfailoverrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. +func (c *HaControllersFailoverCall) RequestId(requestId string) *HaControllersFailoverCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *HaControllersFailoverCall) Fields(s ...googleapi.Field) *HaControllersFailoverCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *HaControllersFailoverCall) Context(ctx context.Context) *HaControllersFailoverCall { + 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 *HaControllersFailoverCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *HaControllersFailoverCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hacontrollersfailoverrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/haControllers/{haController}/failover") + 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{ + "project": c.project, + "region": c.region, + "haController": c.haController, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.haControllers.failover", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.haControllers.failover" 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 *HaControllersFailoverCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.haControllers.failover", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type HealthChecksAggregatedListCall struct { s *Service project string diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index 08f0db7949..64682937c0 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -65956,6 +65956,705 @@ func (c *ZoneQueuedResourcesListCall) Pages(ctx context.Context, f func(*QueuedR } } +type ZoneVmExtensionPoliciesDeleteCall struct { + s *Service + project string + zone string + vmExtensionPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a specified zone VM extension policy. +// +// - project: Project ID for this request. +// - vmExtensionPolicy: Name of the zone VM extension policy to delete. +// - zone: Name of the zone for this request. +func (r *ZoneVmExtensionPoliciesService) Delete(project string, zone string, vmExtensionPolicy string) *ZoneVmExtensionPoliciesDeleteCall { + c := &ZoneVmExtensionPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.vmExtensionPolicy = vmExtensionPolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *ZoneVmExtensionPoliciesDeleteCall) RequestId(requestId string) *ZoneVmExtensionPoliciesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ZoneVmExtensionPoliciesDeleteCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ZoneVmExtensionPoliciesDeleteCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesDeleteCall { + 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 *ZoneVmExtensionPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneVmExtensionPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "vmExtensionPolicy": c.vmExtensionPolicy, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneVmExtensionPolicies.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 *ZoneVmExtensionPoliciesDeleteCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ZoneVmExtensionPoliciesGetCall struct { + s *Service + project string + zone string + vmExtensionPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves details of a specific zone VM extension policy. +// +// - project: Project ID for this request. +// - vmExtensionPolicy: Name of the VM extension policy resource to return. +// - zone: Name of the zone for this request. +func (r *ZoneVmExtensionPoliciesService) Get(project string, zone string, vmExtensionPolicy string) *ZoneVmExtensionPoliciesGetCall { + c := &ZoneVmExtensionPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.vmExtensionPolicy = vmExtensionPolicy + 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 *ZoneVmExtensionPoliciesGetCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesGetCall { + 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 *ZoneVmExtensionPoliciesGetCall) IfNoneMatch(entityTag string) *ZoneVmExtensionPoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ZoneVmExtensionPoliciesGetCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesGetCall { + 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 *ZoneVmExtensionPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneVmExtensionPoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "vmExtensionPolicy": c.vmExtensionPolicy, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneVmExtensionPolicies.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *VmExtensionPolicy.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 *ZoneVmExtensionPoliciesGetCall) Do(opts ...googleapi.CallOption) (*VmExtensionPolicy, 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 := &VmExtensionPolicy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ZoneVmExtensionPoliciesInsertCall struct { + s *Service + project string + zone string + vmextensionpolicy *VmExtensionPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new zone-level VM extension policy within a project. +// +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneVmExtensionPoliciesService) Insert(project string, zone string, vmextensionpolicy *VmExtensionPolicy) *ZoneVmExtensionPoliciesInsertCall { + c := &ZoneVmExtensionPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.vmextensionpolicy = vmextensionpolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *ZoneVmExtensionPoliciesInsertCall) RequestId(requestId string) *ZoneVmExtensionPoliciesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ZoneVmExtensionPoliciesInsertCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ZoneVmExtensionPoliciesInsertCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesInsertCall { + 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 *ZoneVmExtensionPoliciesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneVmExtensionPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmextensionpolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies") + 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{ + "project": c.project, + "zone": c.zone, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneVmExtensionPolicies.insert" 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 *ZoneVmExtensionPoliciesInsertCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.insert", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ZoneVmExtensionPoliciesListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all VM extension policies within a specific zone for a project. +// +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneVmExtensionPoliciesService) List(project string, zone string) *ZoneVmExtensionPoliciesListCall { + c := &ZoneVmExtensionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *ZoneVmExtensionPoliciesListCall) Filter(filter string) *ZoneVmExtensionPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *ZoneVmExtensionPoliciesListCall) MaxResults(maxResults int64) *ZoneVmExtensionPoliciesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *ZoneVmExtensionPoliciesListCall) OrderBy(orderBy string) *ZoneVmExtensionPoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *ZoneVmExtensionPoliciesListCall) PageToken(pageToken string) *ZoneVmExtensionPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *ZoneVmExtensionPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneVmExtensionPoliciesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + 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 *ZoneVmExtensionPoliciesListCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesListCall { + 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 *ZoneVmExtensionPoliciesListCall) IfNoneMatch(entityTag string) *ZoneVmExtensionPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ZoneVmExtensionPoliciesListCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesListCall { + 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 *ZoneVmExtensionPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneVmExtensionPoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneVmExtensionPolicies.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *VmExtensionPolicyList.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 *ZoneVmExtensionPoliciesListCall) Do(opts ...googleapi.CallOption) (*VmExtensionPolicyList, 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 := &VmExtensionPolicyList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.list", "response", internallog.HTTPResponse(res, b)) + 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 *ZoneVmExtensionPoliciesListCall) Pages(ctx context.Context, f func(*VmExtensionPolicyList) 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 ZoneVmExtensionPoliciesUpdateCall struct { + s *Service + project string + zone string + vmExtensionPolicy string + vmextensionpolicy *VmExtensionPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Modifies an existing zone VM extension policy. +// +// - project: Project ID for this request. +// - vmExtensionPolicy: Name of the zone VM extension policy to update. +// - zone: Name of the zone for this request. +func (r *ZoneVmExtensionPoliciesService) Update(project string, zone string, vmExtensionPolicy string, vmextensionpolicy *VmExtensionPolicy) *ZoneVmExtensionPoliciesUpdateCall { + c := &ZoneVmExtensionPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.vmExtensionPolicy = vmExtensionPolicy + c.vmextensionpolicy = vmextensionpolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *ZoneVmExtensionPoliciesUpdateCall) RequestId(requestId string) *ZoneVmExtensionPoliciesUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ZoneVmExtensionPoliciesUpdateCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ZoneVmExtensionPoliciesUpdateCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesUpdateCall { + 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 *ZoneVmExtensionPoliciesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneVmExtensionPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmextensionpolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}") + 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{ + "project": c.project, + "zone": c.zone, + "vmExtensionPolicy": c.vmExtensionPolicy, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.update", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneVmExtensionPolicies.update" 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 *ZoneVmExtensionPoliciesUpdateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.update", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ZonesGetCall struct { s *Service project string diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 7c9827dc8f..4450f2d4d7 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -3200,6 +3200,7 @@ "disk": { "description": "Name of the persistent disk to delete.", "location": "path", + "pattern": "\\S{1,66}", "required": true, "type": "string" }, @@ -7168,14 +7169,14 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return, or its unique numeric identifier.", + "description": "Name of the Operations resource to return. Parent is derived from this field.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, "parentId": { - "description": "Parent ID for this request.", + "description": "Parent ID for this request. Not used. Parent is derived from resource_id.", "location": "query", "type": "string" } @@ -8661,10 +8662,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" + "https://www.googleapis.com/auth/compute" ] }, "list": { @@ -25725,6 +25723,7 @@ "disk": { "description": "Name of the regional persistent disk to delete.", "location": "path", + "pattern": "\\S{1,66}", "required": true, "type": "string" }, @@ -40284,6 +40283,20 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" + }, + "views": { + "description": "Defines the extra views returned back in the subnetwork resource. Supported values: - WITH_UTILIZATION: Utilization data is included in the response. ", + "enum": [ + "DEFAULT", + "WITH_UTILIZATION" + ], + "enumDescriptions": [ + "", + "Utilization data is included in the response." + ], + "location": "query", + "repeated": true, + "type": "string" } }, "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", @@ -40438,6 +40451,20 @@ "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", "location": "query", "type": "boolean" + }, + "views": { + "description": "Defines the extra views returned back in the subnetwork resource. Supported values: - WITH_UTILIZATION: Utilization data is included in the response. ", + "enum": [ + "DEFAULT", + "WITH_UTILIZATION" + ], + "enumDescriptions": [ + "", + "Utilization data is included in the response." + ], + "location": "query", + "repeated": true, + "type": "string" } }, "path": "projects/{project}/regions/{region}/subnetworks", @@ -45720,7 +45747,7 @@ } } }, - "revision": "20250717", + "revision": "20250728", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -48603,6 +48630,10 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "params": { + "$ref": "BackendBucketParams", + "description": "Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload." + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -49056,6 +49087,20 @@ }, "type": "object" }, + "BackendBucketParams": { + "description": "Additional Backend Bucket parameters.", + "id": "BackendBucketParams", + "properties": { + "resourceManagerTags": { + "additionalProperties": { + "type": "string" + }, + "description": "Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"} * {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"} Note: * Invalid combinations of ID \u0026 namespaced format is not supported. For instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", + "type": "object" + } + }, + "type": "object" + }, "BackendBucketUsedBy": { "id": "BackendBucketUsedBy", "properties": { @@ -49080,7 +49125,7 @@ "type": "number" }, "name": { - "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", + "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", "type": "string" } }, @@ -49271,7 +49316,7 @@ "type": "array" }, "localityLbPolicy": { - "description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.", + "description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.", "enum": [ "INVALID_LB_POLICY", "LEAST_REQUEST", @@ -49292,7 +49337,7 @@ "The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.", "This is a simple policy in which each healthy backend is selected in round robin order. This is the default.", "Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weighted based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. This option is only supported in Network Load Balancing.", - "Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field X-Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the backends[].customMetrics fields." + "Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics fields." ], "type": "string" }, @@ -49328,6 +49373,10 @@ "$ref": "OutlierDetection", "description": "Settings controlling the ejection of unhealthy backend endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered disabled. Results of the outlier detection algorithm (ejection of endpoints from the load balancing pool and returning them back to the pool) are executed independently by each proxy instance of the load balancer. In most cases, more than one proxy instance handles the traffic received by a backend service. Thus, it is possible that an unhealthy endpoint is detected and ejected by only some of the proxies, and while this happens, other proxies may continue to send requests to the same unhealthy endpoint until they detect and eject the unhealthy endpoint. Applicable backend endpoints can be: - VM instances in an Instance Group - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud Functions Services - Private Service Connect NEGs, that resolve to Google-managed regional API endpoints or managed services published using Private Service Connect Applicable backend service types can be: - A global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A regional backend service with the serviceProtocol set to HTTP, HTTPS, HTTP2 or H2C, and loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for Serverless NEGs. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." }, + "params": { + "$ref": "BackendServiceParams", + "description": "Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload." + }, "port": { "deprecated": true, "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For internal passthrough Network Load Balancers and external passthrough Network Load Balancers, omit port.", @@ -49769,7 +49818,7 @@ "type": "boolean" }, "name": { - "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", + "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", "type": "string" } }, @@ -50294,7 +50343,7 @@ "The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.", "This is a simple policy in which each healthy backend is selected in round robin order. This is the default.", "Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weighted based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. This option is only supported in Network Load Balancing.", - "Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field X-Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the backends[].customMetrics fields." + "Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics fields." ], "type": "string" } @@ -50373,6 +50422,20 @@ }, "type": "object" }, + "BackendServiceParams": { + "description": "Additional Backend Service parameters.", + "id": "BackendServiceParams", + "properties": { + "resourceManagerTags": { + "additionalProperties": { + "type": "string" + }, + "description": "Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"} * {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"} Note: * Invalid combinations of ID \u0026 namespaced format is not supported. For instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", + "type": "object" + } + }, + "type": "object" + }, "BackendServiceReference": { "id": "BackendServiceReference", "properties": { @@ -55679,7 +55742,8 @@ "type": "boolean" }, "allowPscPacketInjection": { - "description": "This is used in PSC consumer ForwardingRule to control whether the producer is allowed to inject packets into the consumer's network. If set to true, the target service attachment must have tunneling enabled and TunnelingConfig.RoutingMode set to PACKET_INJECTION Non-PSC forwarding rules should not use this field.", + "deprecated": true, + "description": "This is used in PSC consumer ForwardingRule to control whether the producer is allowed to inject packets into the consumer's network. If set to true, the target service attachment must have tunneling enabled and TunnelingConfig.RoutingMode set to PACKET_INJECTION Non-PSC forwarding rules should not use this field. This field was never released to any customers and is deprecated and will be removed in the future.", "type": "boolean" }, "backendService": { @@ -71063,9 +71127,6 @@ "MultiMigsList": { "id": "MultiMigsList", "properties": { - "etag": { - "type": "string" - }, "id": { "description": "Unique identifier for the resource; defined by the server.", "type": "string" @@ -71090,13 +71151,6 @@ "description": "[Output only] Server-defined URL for this resource.", "type": "string" }, - "unreachables": { - "description": "[Output only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, "warning": { "description": "Informational warning message.", "properties": { @@ -79159,16 +79213,14 @@ "id": "PreviewFeatureRolloutOperation", "properties": { "rolloutInput": { - "$ref": "PreviewFeatureRolloutOperationRolloutInput" - }, - "rolloutStatus": { - "$ref": "PreviewFeatureRolloutOperationRolloutStatus", - "readOnly": true + "$ref": "PreviewFeatureRolloutOperationRolloutInput", + "description": "Input only. The input for the rollout operation." } }, "type": "object" }, "PreviewFeatureRolloutOperationRolloutInput": { + "description": "Represents the input for the rollout operation.", "id": "PreviewFeatureRolloutOperationRolloutInput", "properties": { "name": { @@ -79188,47 +79240,6 @@ "" ], "type": "string" - }, - "retryUuid": { - "description": "The UUID of the retry action. Only needed if this is a retry for an existing rollout. This can be used after the user canceled a rollout and want to retry it with no changes.", - "type": "string" - } - }, - "type": "object" - }, - "PreviewFeatureRolloutOperationRolloutStatus": { - "id": "PreviewFeatureRolloutOperationRolloutStatus", - "properties": { - "ongoingRollouts": { - "description": "Output only. The ongoing rollout resources. There can be multiple ongoing rollouts for a resource.", - "items": { - "$ref": "PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata" - }, - "readOnly": true, - "type": "array" - }, - "previousRollout": { - "$ref": "PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata", - "description": "Output only. The last completed rollout resource. This field will not be populated until the first rollout is completed.", - "readOnly": true - } - }, - "type": "object" - }, - "PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata": { - "id": "PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata", - "properties": { - "rollout": { - "description": "The name of the rollout Ex. organizations//locations/global/rollouts/ Ex. folders//locations/global/rollouts/ Ex. projects//locations/global/rollouts/.", - "type": "string" - }, - "rolloutPlan": { - "description": "The name of the rollout plan Ex. organizations//locations/global/rolloutPlans/ Ex. folders//locations/global/rolloutPlans/ Ex. projects//locations/global/rolloutPlans/.", - "type": "string" - }, - "status": { - "$ref": "PreviewFeatureStatus", - "description": "The status of the rollout." } }, "type": "object" @@ -79241,6 +79252,10 @@ "description": "[Output Only] The description of the feature.", "type": "string" }, + "helpLink": { + "description": "[Output Only] Link to the public documentation for the feature.", + "type": "string" + }, "releaseStatus": { "$ref": "PreviewFeatureStatusReleaseStatus" } @@ -79248,6 +79263,7 @@ "type": "object" }, "PreviewFeatureStatusReleaseStatus": { + "description": "[Output Only] The release status of the feature.", "id": "PreviewFeatureStatusReleaseStatus", "properties": { "stage": { @@ -79255,14 +79271,12 @@ "enum": [ "DEPRECATED", "GA", - "INTERNAL", "PREVIEW", "STAGE_UNSPECIFIED" ], "enumDescriptions": [ "", "", - "Exclude until there's product requirements.", "", "" ], @@ -82965,6 +82979,20 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "protectionTier": { + "description": "Protection tier for the workload which specifies the workload expectations in the event of infrastructure failures at data center (e.g. power and/or cooling failures).", + "enum": [ + "CAPACITY_OPTIMIZED", + "PROTECTION_TIER_UNSPECIFIED", + "STANDARD" + ], + "enumDescriptions": [ + "CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. power, cooling) at the data center during normal operating conditions. In the event of infrastructure failures at data center (e.g. power and/or cooling failures), this workload may be disrupted. As a consequence, it has a weaker availability SLO than STANDARD.", + "Unspecified protection tier.", + "STANDARD protection for workload that should be protected by redundancies (e.g. power, cooling) at the data center level. In the event of infrastructure failures at data center (e.g. power and/or cooling failures), this workload is expected to continue as normal using the redundancies." + ], + "type": "string" + }, "reservationMode": { "description": "[Output only] Indicates the reservation mode of the reservation.", "enum": [ @@ -85440,11 +85468,6 @@ "type": "string" }, "tags": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, "description": "A list of instance tags to which this route applies.", "items": { "type": "string" @@ -89569,7 +89592,7 @@ "type": "string" }, "type": { - "description": "Type of the redirect action.", + "description": "Type of the redirect action. Possible values are: - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual challenge assessment. - EXTERNAL_302: redirect to a different URL via a 302 response. ", "enum": [ "EXTERNAL_302", "GOOGLE_RECAPTCHA" @@ -89743,7 +89766,7 @@ "type": "string" }, "consumerAcceptLists": { - "description": "Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks.", + "description": "Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.", "items": { "$ref": "ServiceAttachmentConsumerProjectLimit" }, @@ -89790,6 +89813,13 @@ "description": "[Output Only] Type of the resource. Always compute#serviceAttachment for service attachments.", "type": "string" }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata of the service attachment.", + "type": "object" + }, "name": { "annotations": { "required": [ @@ -90056,7 +90086,7 @@ "id": "ServiceAttachmentConsumerProjectLimit", "properties": { "connectionLimit": { - "description": "The value of the limit to set.", + "description": "The value of the limit to set. For endpoint_url, the limit should be no more than 1.", "format": "uint32", "type": "integer" }, @@ -93030,7 +93060,7 @@ "compute.storagePools.insert" ] }, - "description": "Size, in GiB, of the storage pool. For more information about the size limits, see https://cloud.google.com/compute/docs/disks/storage-pools.", + "description": "Size of the storage pool in GiB. For more information about the size limits, see https://cloud.google.com/compute/docs/disks/storage-pools.", "format": "int64", "type": "string" }, @@ -93040,7 +93070,7 @@ "type": "string" }, "poolProvisionedThroughput": { - "description": "Provisioned throughput of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput.", + "description": "Provisioned throughput of the storage pool in MiB/s. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput.", "format": "int64", "type": "string" }, @@ -93671,7 +93701,7 @@ "type": "string" }, "maxTotalProvisionedDiskCapacityGb": { - "description": "[Output Only] Maximum allowed aggregate disk size in gigabytes.", + "description": "[Output Only] Maximum allowed aggregate disk size in GiB.", "format": "int64", "type": "string" }, @@ -93686,7 +93716,7 @@ "type": "string" }, "poolUsedThroughput": { - "description": "[Output Only] Sum of all the disks' provisioned throughput in MB/s.", + "description": "[Output Only] Sum of all the disks' provisioned throughput in MiB/s.", "format": "int64", "type": "string" }, @@ -93696,7 +93726,7 @@ "type": "string" }, "totalProvisionedDiskCapacityGb": { - "description": "[Output Only] Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.", + "description": "[Output Only] Sum of all the disks' provisioned capacity (in GiB) in this storage pool. A disk's provisioned capacity is the same as its total capacity.", "format": "int64", "type": "string" }, @@ -93706,7 +93736,7 @@ "type": "string" }, "totalProvisionedDiskThroughput": { - "description": "[Output Only] Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.", + "description": "[Output Only] Sum of all the disks' provisioned throughput in MiB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.", "format": "int64", "type": "string" } @@ -94547,6 +94577,18 @@ "description": "The URL of the reserved internal range.", "type": "string" }, + "resolveSubnetMask": { + "description": "Configures subnet mask resolution for this subnetwork.", + "enum": [ + "ARP_ALL_RANGES", + "ARP_PRIMARY_RANGE" + ], + "enumDescriptions": [ + "All ranges assigned to the VM NIC will respond to ARP.", + "Only the primary range of the VM NIC will respond to ARP." + ], + "type": "string" + }, "role": { "description": "The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", "enum": [ @@ -94611,6 +94653,11 @@ }, "readOnly": true, "type": "array" + }, + "utilizationDetails": { + "$ref": "SubnetworkUtilizationDetails", + "description": "Output only. [Output Only] The current IP utilization of all subnetwork ranges. Contains the total number of allocated and free IPs in each range.", + "readOnly": true } }, "type": "object" @@ -95026,6 +95073,64 @@ }, "type": "object" }, + "SubnetworkUtilizationDetails": { + "description": "The current IP utilization of all subnetwork ranges. Contains the total number of allocated and free IPs in each range.", + "id": "SubnetworkUtilizationDetails", + "properties": { + "externalIpv6InstanceUtilization": { + "$ref": "SubnetworkUtilizationDetailsIPV6Utilization", + "description": "Utilizations of external IPV6 IP range." + }, + "externalIpv6LbUtilization": { + "$ref": "SubnetworkUtilizationDetailsIPV6Utilization", + "description": "Utilizations of external IPV6 IP range for NetLB." + }, + "internalIpv6Utilization": { + "$ref": "SubnetworkUtilizationDetailsIPV6Utilization", + "description": "Utilizations of internal IPV6 IP range." + }, + "ipv4Utilizations": { + "description": "Utilizations of all IPV4 IP ranges. For primary ranges, the range name will be empty.", + "items": { + "$ref": "SubnetworkUtilizationDetailsIPV4Utilization" + }, + "type": "array" + } + }, + "type": "object" + }, + "SubnetworkUtilizationDetailsIPV4Utilization": { + "description": "The IPV4 utilization of a single IP range.", + "id": "SubnetworkUtilizationDetailsIPV4Utilization", + "properties": { + "rangeName": { + "description": "Will be set for secondary range. Empty for primary IPv4 range.", + "type": "string" + }, + "totalAllocatedIp": { + "format": "int64", + "type": "string" + }, + "totalFreeIp": { + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "SubnetworkUtilizationDetailsIPV6Utilization": { + "description": "The IPV6 utilization of a single IP range.", + "id": "SubnetworkUtilizationDetailsIPV6Utilization", + "properties": { + "totalAllocatedIp": { + "$ref": "Uint128" + }, + "totalFreeIp": { + "$ref": "Uint128" + } + }, + "type": "object" + }, "SubnetworksExpandIpCidrRangeRequest": { "id": "SubnetworksExpandIpCidrRangeRequest", "properties": { @@ -99371,7 +99476,9 @@ "FAILURE_NETWORK", "FAILURE_NVLINK", "INFRASTRUCTURE_RELOCATION", - "MAINTENANCE_REASON_UNKNOWN" + "MAINTENANCE_REASON_UNKNOWN", + "PLANNED_NETWORK_UPDATE", + "PLANNED_UPDATE" ], "enumDescriptions": [ "Maintenance due to disk errors.", @@ -99384,7 +99491,9 @@ "Maintenance due to network errors.", "Maintenance due to NVLink failure.", "Maintenance due to infrastructure relocation.", - "Unknown maintenance reason. Do not use this value." + "Unknown maintenance reason. Do not use this value.", + "Maintenance due to planned network update.", + "Maintenance due to planned update to the instance." ], "type": "string" }, @@ -99406,11 +99515,13 @@ "type": { "description": "Defines the type of maintenance.", "enum": [ + "MULTIPLE", "SCHEDULED", "UNKNOWN_TYPE", "UNSCHEDULED" ], "enumDescriptions": [ + "Multiple maintenance types in one window. This is only intended to be used for groups.", "Scheduled maintenance (e.g. maintenance after uptime guarantee is complete).", "No type specified. Do not use this value.", "Unscheduled maintenance (e.g. emergency maintenance during uptime guarantee)." diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index 3932ccd400..8fa56e9ea0 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -4868,6 +4868,9 @@ type BackendBucket struct { // lowercase letter, or digit, except the last character, which cannot be a // dash. Name string `json:"name,omitempty"` + // Params: Input only. [Input Only] Additional params passed with the request, + // but not persisted as part of resource payload. + Params *BackendBucketParams `json:"params,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` // UsedBy: [Output Only] List of resources referencing that backend bucket. @@ -5419,6 +5422,36 @@ func (s BackendBucketListUsableWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BackendBucketParams: Additional Backend Bucket parameters. +type BackendBucketParams struct { + // ResourceManagerTags: Tag keys/values directly bound to this resource. Tag + // keys and values have the same definition as resource manager tags. The field + // is allowed for INSERT only. The keys/values to set on the resource should be + // specified in either ID { : } or Namespaced format { : }. For example the + // following are valid inputs: * {"tagKeys/333" : "tagValues/444", + // "tagKeys/123" : "tagValues/456"} * {"123/environment" : "production", + // "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is + // not supported. For instance: {"123/environment" : "tagValues/444"} is + // invalid. + ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") 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. "ResourceManagerTags") 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 BackendBucketParams) MarshalJSON() ([]byte, error) { + type NoMethod BackendBucketParams + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type BackendBucketUsedBy struct { // Reference: [Output Only] Server-defined URL for UrlMaps referencing that // BackendBucket. @@ -5452,7 +5485,7 @@ type BackendCustomMetric struct { MaxUtilization float64 `json:"maxUtilization,omitempty"` // Name: Name of a custom utilization signal. The name must be 1-64 characters // long and match the regular expression a-z ([-_.a-z0-9]*[a-z0-9])? which - // means the first character must be a lowercase letter, and all following + // means that the first character must be a lowercase letter, and all following // characters must be a dash, period, underscore, lowercase letter, or digit, // except the last character, which cannot be a dash, period, or underscore. // For usage guidelines, see Custom Metrics balancing mode. This field can only @@ -5729,18 +5762,23 @@ type BackendService struct { // MAGLEV: used as a drop in replacement for the ring hash load balancer. // Maglev is not as stable as ring hash but has faster table lookup build times // and host selection times. For more information about Maglev, see - // https://ai.google/research/pubs/pub44824 This field is applicable to either: - // - A regional backend service with the service_protocol set to HTTP, HTTPS, - // HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global - // backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, - // INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not - // configured—that is, if session affinity remains at the default value of - // NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If - // session affinity is set to a value other than NONE, then the default value - // for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported - // when the backend service is referenced by a URL map that is bound to target - // gRPC proxy that has validateForProxyless field set to true. localityLbPolicy - // cannot be specified with haPolicy. + // https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: + // Per-endpoint Weighted Round Robin Load Balancing using weights computed from + // Backend reported Custom Metrics. If set, the Backend Service responses are + // expected to contain non-standard HTTP response header field + // Endpoint-Load-Metrics. The reported metrics to use for computing the weights + // are specified via the customMetrics field. This field is applicable to + // either: - A regional backend service with the service_protocol set to HTTP, + // HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A + // global backend service with the load_balancing_scheme set to + // INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If + // sessionAffinity is not configured—that is, if session affinity remains at + // the default value of NONE—then the default value for localityLbPolicy is + // ROUND_ROBIN. If session affinity is set to a value other than NONE, then the + // default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH + // are supported when the backend service is referenced by a URL map that is + // bound to target gRPC proxy that has validateForProxyless field set to true. + // localityLbPolicy cannot be specified with haPolicy. // // Possible values: // "INVALID_LB_POLICY" @@ -5774,8 +5812,8 @@ type BackendService struct { // "WEIGHTED_ROUND_ROBIN" - Per-endpoint weighted round-robin Load Balancing // using weights computed from Backend reported Custom Metrics. If set, the // Backend Service responses are expected to contain non-standard HTTP response - // header field X-Endpoint-Load-Metrics. The reported metrics to use for - // computing the weights are specified via the backends[].customMetrics fields. + // header field Endpoint-Load-Metrics. The reported metrics to use for + // computing the weights are specified via the customMetrics fields. LocalityLbPolicy string `json:"localityLbPolicy,omitempty"` // LogConfig: This field denotes the logging options for the load balancer // traffic served by this backend service. If logging is enabled, logs will be @@ -5838,6 +5876,9 @@ type BackendService struct { // referenced by a URL map that is bound to target gRPC proxy that has // validateForProxyless field set to true. OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"` + // Params: Input only. [Input Only] Additional params passed with the request, + // but not persisted as part of resource payload. + Params *BackendServiceParams `json:"params,omitempty"` // Port: Deprecated in favor of portName. The TCP port to connect on the // backend. The default value is 80. For internal passthrough Network Load // Balancers and external passthrough Network Load Balancers, omit port. @@ -6409,7 +6450,7 @@ type BackendServiceCustomMetric struct { DryRun bool `json:"dryRun,omitempty"` // Name: Name of a custom utilization signal. The name must be 1-64 characters // long and match the regular expression a-z ([-_.a-z0-9]*[a-z0-9])? which - // means the first character must be a lowercase letter, and all following + // means that the first character must be a lowercase letter, and all following // characters must be a dash, period, underscore, lowercase letter, or digit, // except the last character, which cannot be a dash, period, or underscore. // For usage guidelines, see Custom Metrics balancing mode. This field can only @@ -7192,8 +7233,8 @@ type BackendServiceLocalityLoadBalancingPolicyConfigPolicy struct { // "WEIGHTED_ROUND_ROBIN" - Per-endpoint weighted round-robin Load Balancing // using weights computed from Backend reported Custom Metrics. If set, the // Backend Service responses are expected to contain non-standard HTTP response - // header field X-Endpoint-Load-Metrics. The reported metrics to use for - // computing the weights are specified via the backends[].customMetrics fields. + // header field Endpoint-Load-Metrics. The reported metrics to use for + // computing the weights are specified via the customMetrics fields. 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 @@ -7356,6 +7397,36 @@ func (s *BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity) Unmarshal return nil } +// BackendServiceParams: Additional Backend Service parameters. +type BackendServiceParams struct { + // ResourceManagerTags: Tag keys/values directly bound to this resource. Tag + // keys and values have the same definition as resource manager tags. The field + // is allowed for INSERT only. The keys/values to set on the resource should be + // specified in either ID { : } or Namespaced format { : }. For example the + // following are valid inputs: * {"tagKeys/333" : "tagValues/444", + // "tagKeys/123" : "tagValues/456"} * {"123/environment" : "production", + // "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is + // not supported. For instance: {"123/environment" : "tagValues/444"} is + // invalid. + ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") 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. "ResourceManagerTags") 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 BackendServiceParams) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceParams + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type BackendServiceReference struct { BackendService string `json:"backendService,omitempty"` // ForceSendFields is a list of field names (e.g. "BackendService") to @@ -13483,7 +13554,9 @@ type ForwardingRule struct { // control whether the producer is allowed to inject packets into the // consumer's network. If set to true, the target service attachment must have // tunneling enabled and TunnelingConfig.RoutingMode set to PACKET_INJECTION - // Non-PSC forwarding rules should not use this field. + // Non-PSC forwarding rules should not use this field. This field was never + // released to any customers and is deprecated and will be removed in the + // future. AllowPscPacketInjection bool `json:"allowPscPacketInjection,omitempty"` // BackendService: Identifies the backend service to which the forwarding rule // sends traffic. Required for internal and external passthrough Network Load @@ -31100,7 +31173,6 @@ func (s MultiMigResourcePolicies) MarshalJSON() ([]byte, error) { } type MultiMigsList struct { - Etag string `json:"etag,omitempty"` // Id: Unique identifier for the resource; defined by the server. Id string `json:"id,omitempty"` // Items: A list of multi-MIGs in the specified project and region. @@ -31114,20 +31186,18 @@ type MultiMigsList struct { NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` // Warning: Informational warning message. Warning *MultiMigsListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally + // ForceSendFields is a list of field names (e.g. "Id") 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. "Etag") to include in API requests + // NullFields is a list of field names (e.g. "Id") 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. @@ -39647,8 +39717,8 @@ func (s PreviewFeatureListWarningData) MarshalJSON() ([]byte, error) { // PreviewFeatureRolloutOperation: Represents the rollout operation type PreviewFeatureRolloutOperation struct { - RolloutInput *PreviewFeatureRolloutOperationRolloutInput `json:"rolloutInput,omitempty"` - RolloutStatus *PreviewFeatureRolloutOperationRolloutStatus `json:"rolloutStatus,omitempty"` + // RolloutInput: Input only. The input for the rollout operation. + RolloutInput *PreviewFeatureRolloutOperationRolloutInput `json:"rolloutInput,omitempty"` // ForceSendFields is a list of field names (e.g. "RolloutInput") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -39667,6 +39737,8 @@ func (s PreviewFeatureRolloutOperation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PreviewFeatureRolloutOperationRolloutInput: Represents the input for the +// rollout operation. type PreviewFeatureRolloutOperationRolloutInput struct { // Name: The name of the rollout plan Ex. // organizations//locations/global/rolloutPlans/ Ex. @@ -39680,10 +39752,6 @@ type PreviewFeatureRolloutOperationRolloutInput struct { // "ROLLOUT_PLAN_TWO_DAY_ROLLOUT" // "ROLLOUT_PLAN_UNSPECIFIED" PredefinedRolloutPlan string `json:"predefinedRolloutPlan,omitempty"` - // RetryUuid: The UUID of the retry action. Only needed if this is a retry for - // an existing rollout. This can be used after the user canceled a rollout and - // want to retry it with no changes. - RetryUuid string `json:"retryUuid,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 // omitted from API requests. See @@ -39702,66 +39770,12 @@ func (s PreviewFeatureRolloutOperationRolloutInput) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type PreviewFeatureRolloutOperationRolloutStatus struct { - // OngoingRollouts: Output only. The ongoing rollout resources. There can be - // multiple ongoing rollouts for a resource. - OngoingRollouts []*PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata `json:"ongoingRollouts,omitempty"` - // PreviousRollout: Output only. The last completed rollout resource. This - // field will not be populated until the first rollout is completed. - PreviousRollout *PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata `json:"previousRollout,omitempty"` - // ForceSendFields is a list of field names (e.g. "OngoingRollouts") 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. "OngoingRollouts") 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 PreviewFeatureRolloutOperationRolloutStatus) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureRolloutOperationRolloutStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata struct { - // Rollout: The name of the rollout Ex. - // organizations//locations/global/rollouts/ Ex. - // folders//locations/global/rollouts/ Ex. - // projects//locations/global/rollouts/. - Rollout string `json:"rollout,omitempty"` - // RolloutPlan: The name of the rollout plan Ex. - // organizations//locations/global/rolloutPlans/ Ex. - // folders//locations/global/rolloutPlans/ Ex. - // projects//locations/global/rolloutPlans/. - RolloutPlan string `json:"rolloutPlan,omitempty"` - // Status: The status of the rollout. - Status *PreviewFeatureStatus `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Rollout") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. 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. "Rollout") 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 PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureRolloutOperationRolloutStatusRolloutMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // PreviewFeatureStatus: [Output Only] The status of the feature. type PreviewFeatureStatus struct { // Description: [Output Only] The description of the feature. - Description string `json:"description,omitempty"` + Description string `json:"description,omitempty"` + // HelpLink: [Output Only] Link to the public documentation for the feature. + HelpLink string `json:"helpLink,omitempty"` ReleaseStatus *PreviewFeatureStatusReleaseStatus `json:"releaseStatus,omitempty"` // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with empty or @@ -39781,13 +39795,14 @@ func (s PreviewFeatureStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PreviewFeatureStatusReleaseStatus: [Output Only] The release status of the +// feature. type PreviewFeatureStatusReleaseStatus struct { // Stage: [Output Only] The stage of the feature. // // Possible values: // "DEPRECATED" // "GA" - // "INTERNAL" - Exclude until there's product requirements. // "PREVIEW" // "STAGE_UNSPECIFIED" Stage string `json:"stage,omitempty"` @@ -43754,6 +43769,22 @@ type Reservation struct { // must be a dash, lowercase letter, or digit, except the last character, which // cannot be a dash. Name string `json:"name,omitempty"` + // ProtectionTier: Protection tier for the workload which specifies the + // workload expectations in the event of infrastructure failures at data center + // (e.g. power and/or cooling failures). + // + // Possible values: + // "CAPACITY_OPTIMIZED" - CAPACITY_OPTIMIZED capacity leverages redundancies + // (e.g. power, cooling) at the data center during normal operating conditions. + // In the event of infrastructure failures at data center (e.g. power and/or + // cooling failures), this workload may be disrupted. As a consequence, it has + // a weaker availability SLO than STANDARD. + // "PROTECTION_TIER_UNSPECIFIED" - Unspecified protection tier. + // "STANDARD" - STANDARD protection for workload that should be protected by + // redundancies (e.g. power, cooling) at the data center level. In the event of + // infrastructure failures at data center (e.g. power and/or cooling failures), + // this workload is expected to continue as normal using the redundancies. + ProtectionTier string `json:"protectionTier,omitempty"` // ReservationMode: [Output only] Indicates the reservation mode of the // reservation. // @@ -50892,7 +50923,9 @@ type SecurityPolicyRuleRedirectOptions struct { // Target: Target for the redirect action. This is required if the type is // EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. Target string `json:"target,omitempty"` - // Type: Type of the redirect action. + // Type: Type of the redirect action. Possible values are: - GOOGLE_RECAPTCHA: + // redirect to reCAPTCHA for manual challenge assessment. - EXTERNAL_302: + // redirect to a different URL via a 302 response. // // Possible values: // "EXTERNAL_302" @@ -51122,7 +51155,7 @@ type ServiceAttachment struct { // connection limit. A given service attachment can manage connections at // either the project or network level. Therefore, both the accept and reject // lists for a given service attachment must contain either only projects or - // only networks. + // only networks or only endpoints. ConsumerAcceptLists []*ServiceAttachmentConsumerProjectLimit `json:"consumerAcceptLists,omitempty"` // ConsumerRejectLists: Specifies a list of projects or networks that are not // allowed to connect to this service attachment. The project can be specified @@ -51159,6 +51192,8 @@ type ServiceAttachment struct { // Kind: [Output Only] Type of the resource. Always compute#serviceAttachment // for service attachments. Kind string `json:"kind,omitempty"` + // Metadata: Metadata of the service attachment. + Metadata map[string]string `json:"metadata,omitempty"` // Name: Name of the resource. Provided by the client when the resource is // created. The name must be 1-63 characters long, and comply with RFC1035. // Specifically, the name must be 1-63 characters long and match the regular @@ -51437,7 +51472,8 @@ func (s ServiceAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { } type ServiceAttachmentConsumerProjectLimit struct { - // ConnectionLimit: The value of the limit to set. + // ConnectionLimit: The value of the limit to set. For endpoint_url, the limit + // should be no more than 1. ConnectionLimit int64 `json:"connectionLimit,omitempty"` // NetworkUrl: The network URL for the network to set the limit for. NetworkUrl string `json:"networkUrl,omitempty"` @@ -54619,15 +54655,15 @@ type StoragePool struct { // pool disks' exclusive use. // "UNSPECIFIED" PerformanceProvisioningType string `json:"performanceProvisioningType,omitempty"` - // PoolProvisionedCapacityGb: Size, in GiB, of the storage pool. For more + // PoolProvisionedCapacityGb: Size of the storage pool in GiB. For more // information about the size limits, see // https://cloud.google.com/compute/docs/disks/storage-pools. PoolProvisionedCapacityGb int64 `json:"poolProvisionedCapacityGb,omitempty,string"` // PoolProvisionedIops: Provisioned IOPS of the storage pool. Only relevant if // the storage pool type is hyperdisk-balanced. PoolProvisionedIops int64 `json:"poolProvisionedIops,omitempty,string"` - // PoolProvisionedThroughput: Provisioned throughput of the storage pool. Only - // relevant if the storage pool type is hyperdisk-balanced or + // PoolProvisionedThroughput: Provisioned throughput of the storage pool in + // MiB/s. Only relevant if the storage pool type is hyperdisk-balanced or // hyperdisk-throughput. PoolProvisionedThroughput int64 `json:"poolProvisionedThroughput,omitempty,string"` // ResourceStatus: [Output Only] Status information for the storage pool @@ -55217,7 +55253,7 @@ type StoragePoolResourceStatus struct { // in RFC3339 text format. LastResizeTimestamp string `json:"lastResizeTimestamp,omitempty"` // MaxTotalProvisionedDiskCapacityGb: [Output Only] Maximum allowed aggregate - // disk size in gigabytes. + // disk size in GiB. MaxTotalProvisionedDiskCapacityGb int64 `json:"maxTotalProvisionedDiskCapacityGb,omitempty,string"` // PoolUsedCapacityBytes: [Output Only] Space used by data stored in disks // within the storage pool (in bytes). This will reflect the total number of @@ -55230,20 +55266,20 @@ type StoragePoolResourceStatus struct { // https://cloud.google.com/compute/docs/disks/storage-pools. PoolUsedIops int64 `json:"poolUsedIops,omitempty,string"` // PoolUsedThroughput: [Output Only] Sum of all the disks' provisioned - // throughput in MB/s. + // throughput in MiB/s. PoolUsedThroughput int64 `json:"poolUsedThroughput,omitempty,string"` // PoolUserWrittenBytes: [Output Only] Amount of data written into the pool, // before it is compacted. PoolUserWrittenBytes int64 `json:"poolUserWrittenBytes,omitempty,string"` - // TotalProvisionedDiskCapacityGb: [Output Only] Sum of all the capacity - // provisioned in disks in this storage pool. A disk's provisioned capacity is - // the same as its total capacity. + // TotalProvisionedDiskCapacityGb: [Output Only] Sum of all the disks' + // provisioned capacity (in GiB) in this storage pool. A disk's provisioned + // capacity is the same as its total capacity. TotalProvisionedDiskCapacityGb int64 `json:"totalProvisionedDiskCapacityGb,omitempty,string"` // TotalProvisionedDiskIops: [Output Only] Sum of all the disks' provisioned // IOPS. TotalProvisionedDiskIops int64 `json:"totalProvisionedDiskIops,omitempty,string"` // TotalProvisionedDiskThroughput: [Output Only] Sum of all the disks' - // provisioned throughput in MB/s, minus some amount that is allowed per disk + // provisioned throughput in MiB/s, minus some amount that is allowed per disk // that is not counted towards pool's throughput capacity. TotalProvisionedDiskThroughput int64 `json:"totalProvisionedDiskThroughput,omitempty,string"` // ForceSendFields is a list of field names (e.g. "DiskCount") to @@ -56097,6 +56133,13 @@ type Subnetwork struct { Region string `json:"region,omitempty"` // ReservedInternalRange: The URL of the reserved internal range. ReservedInternalRange string `json:"reservedInternalRange,omitempty"` + // ResolveSubnetMask: Configures subnet mask resolution for this subnetwork. + // + // Possible values: + // "ARP_ALL_RANGES" - All ranges assigned to the VM NIC will respond to ARP. + // "ARP_PRIMARY_RANGE" - Only the primary range of the VM NIC will respond to + // ARP. + ResolveSubnetMask string `json:"resolveSubnetMask,omitempty"` // Role: The role of subnetwork. Currently, this field is only used when // purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. The value // can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is @@ -56147,6 +56190,10 @@ type Subnetwork struct { // internal IPv6 network ranges reserved from the subnetwork's internal IPv6 // range for system use. SystemReservedInternalIpv6Ranges []string `json:"systemReservedInternalIpv6Ranges,omitempty"` + // UtilizationDetails: Output only. [Output Only] The current IP utilization of + // all subnetwork ranges. Contains the total number of allocated and free IPs + // in each range. + UtilizationDetails *SubnetworkUtilizationDetails `json:"utilizationDetails,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -56622,6 +56669,85 @@ func (s SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SubnetworkUtilizationDetails: The current IP utilization of all subnetwork +// ranges. Contains the total number of allocated and free IPs in each range. +type SubnetworkUtilizationDetails struct { + // ExternalIpv6InstanceUtilization: Utilizations of external IPV6 IP range. + ExternalIpv6InstanceUtilization *SubnetworkUtilizationDetailsIPV6Utilization `json:"externalIpv6InstanceUtilization,omitempty"` + // ExternalIpv6LbUtilization: Utilizations of external IPV6 IP range for NetLB. + ExternalIpv6LbUtilization *SubnetworkUtilizationDetailsIPV6Utilization `json:"externalIpv6LbUtilization,omitempty"` + // InternalIpv6Utilization: Utilizations of internal IPV6 IP range. + InternalIpv6Utilization *SubnetworkUtilizationDetailsIPV6Utilization `json:"internalIpv6Utilization,omitempty"` + // Ipv4Utilizations: Utilizations of all IPV4 IP ranges. For primary ranges, + // the range name will be empty. + Ipv4Utilizations []*SubnetworkUtilizationDetailsIPV4Utilization `json:"ipv4Utilizations,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ExternalIpv6InstanceUtilization") 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. "ExternalIpv6InstanceUtilization") + // 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 SubnetworkUtilizationDetails) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkUtilizationDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SubnetworkUtilizationDetailsIPV4Utilization: The IPV4 utilization of a +// single IP range. +type SubnetworkUtilizationDetailsIPV4Utilization struct { + // RangeName: Will be set for secondary range. Empty for primary IPv4 range. + RangeName string `json:"rangeName,omitempty"` + TotalAllocatedIp int64 `json:"totalAllocatedIp,omitempty,string"` + TotalFreeIp int64 `json:"totalFreeIp,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "RangeName") 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. "RangeName") 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 SubnetworkUtilizationDetailsIPV4Utilization) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkUtilizationDetailsIPV4Utilization + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SubnetworkUtilizationDetailsIPV6Utilization: The IPV6 utilization of a +// single IP range. +type SubnetworkUtilizationDetailsIPV6Utilization struct { + TotalAllocatedIp *Uint128 `json:"totalAllocatedIp,omitempty"` + TotalFreeIp *Uint128 `json:"totalFreeIp,omitempty"` + // ForceSendFields is a list of field names (e.g. "TotalAllocatedIp") 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. "TotalAllocatedIp") 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 SubnetworkUtilizationDetailsIPV6Utilization) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkUtilizationDetailsIPV6Utilization + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type SubnetworksExpandIpCidrRangeRequest struct { // IpCidrRange: The IP (in CIDR format or netmask) of internal addresses that // are legal on this Subnetwork. This range should be disjoint from other @@ -61432,6 +61558,8 @@ type UpcomingMaintenance struct { // relocation. // "MAINTENANCE_REASON_UNKNOWN" - Unknown maintenance reason. Do not use this // value. + // "PLANNED_NETWORK_UPDATE" - Maintenance due to planned network update. + // "PLANNED_UPDATE" - Maintenance due to planned update to the instance. MaintenanceReasons []string `json:"maintenanceReasons,omitempty"` // Possible values: // "ONGOING" - There is ongoing maintenance on this VM. @@ -61441,6 +61569,8 @@ type UpcomingMaintenance struct { // Type: Defines the type of maintenance. // // Possible values: + // "MULTIPLE" - Multiple maintenance types in one window. This is only + // intended to be used for groups. // "SCHEDULED" - Scheduled maintenance (e.g. maintenance after uptime // guarantee is complete). // "UNKNOWN_TYPE" - No type specified. Do not use this value. diff --git a/compute/v0.beta/compute2-gen.go b/compute/v0.beta/compute2-gen.go index 8cdf4d3217..b0ecac8f7f 100644 --- a/compute/v0.beta/compute2-gen.go +++ b/compute/v0.beta/compute2-gen.go @@ -21647,7 +21647,7 @@ func (c *GlobalOrganizationOperationsDeleteCall) Do(opts ...googleapi.CallOption type GlobalOrganizationOperationsGetCall struct { s *Service - operationid string + operation string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -21657,15 +21657,16 @@ type GlobalOrganizationOperationsGetCall struct { // Get: Retrieves the specified Operations resource. Gets a list of operations // by making a `list()` request. // -// - operation: Name of the Operations resource to return, or its unique -// numeric identifier. -func (r *GlobalOrganizationOperationsService) Get(operationid string) *GlobalOrganizationOperationsGetCall { +// - operation: Name of the Operations resource to return. Parent is derived +// from this field. +func (r *GlobalOrganizationOperationsService) Get(operation string) *GlobalOrganizationOperationsGetCall { c := &GlobalOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operationid = operationid + c.operation = operation return c } // ParentId sets the optional parameter "parentId": Parent ID for this request. +// Not used. Parent is derived from resource_id. func (c *GlobalOrganizationOperationsGetCall) ParentId(parentId string) *GlobalOrganizationOperationsGetCall { c.urlParams_.Set("parentId", parentId) return c @@ -21717,7 +21718,7 @@ func (c *GlobalOrganizationOperationsGetCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "operation": c.operationid, + "operation": c.operation, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) diff --git a/compute/v0.beta/compute3-gen.go b/compute/v0.beta/compute3-gen.go index f0f3b9674b..c7af3d6936 100644 --- a/compute/v0.beta/compute3-gen.go +++ b/compute/v0.beta/compute3-gen.go @@ -45634,6 +45634,19 @@ func (r *SubnetworksService) Get(project string, region string, subnetwork strin return c } +// Views sets the optional parameter "views": Defines the extra views returned +// back in the subnetwork resource. Supported values: - WITH_UTILIZATION: +// Utilization data is included in the response. +// +// Possible values: +// +// "DEFAULT" +// "WITH_UTILIZATION" - Utilization data is included in the response. +func (c *SubnetworksGetCall) Views(views ...string) *SubnetworksGetCall { + c.urlParams_.SetMulti("views", append([]string{}, views...)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -46074,6 +46087,19 @@ func (c *SubnetworksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *S return c } +// Views sets the optional parameter "views": Defines the extra views returned +// back in the subnetwork resource. Supported values: - WITH_UTILIZATION: +// Utilization data is included in the response. +// +// Possible values: +// +// "DEFAULT" +// "WITH_UTILIZATION" - Utilization data is included in the response. +func (c *SubnetworksListCall) Views(views ...string) *SubnetworksListCall { + c.urlParams_.SetMulti("views", append([]string{}, views...)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index 6163951f57..4d784885a4 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -697,7 +697,7 @@ ], "parameters": { "authorizedViewSetId": { - "description": "Optional. A unique ID for the new AuthorizedViewSet. This ID will become the final component of the AuthorizedViewSet's resource name. If no ID is specified, a server-generated ID will be used. This value should be 4-64 characters and must match the regular expression `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. See go/aip/122#resource-id-segments", + "description": "Optional. A unique ID for the new AuthorizedViewSet. This ID will become the final component of the AuthorizedViewSet's resource name. If no ID is specified, a server-generated ID will be used. This value should be 4-64 characters and must match the regular expression `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. See aip.dev/122#resource-id-segments", "location": "query", "type": "string" }, @@ -869,7 +869,7 @@ ], "parameters": { "authorizedViewId": { - "description": "Optional. A unique ID for the new AuthorizedView. This ID will become the final component of the AuthorizedView's resource name. If no ID is specified, a server-generated ID will be used. This value should be 4-64 characters and must match the regular expression `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. See go/aip/122#resource-id-segments", + "description": "Optional. A unique ID for the new AuthorizedView. This ID will become the final component of the AuthorizedView's resource name. If no ID is specified, a server-generated ID will be used. This value should be 4-64 characters and must match the regular expression `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. See aip.dev/122#resource-id-segments", "location": "query", "type": "string" }, @@ -5305,7 +5305,7 @@ } } }, - "revision": "20250721", + "revision": "20250729", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index c0fb805f16..c00b6412f4 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -13740,7 +13740,7 @@ func (r *ProjectsLocationsAuthorizedViewSetsService) Create(parent string, googl // component of the AuthorizedViewSet's resource name. If no ID is specified, a // server-generated ID will be used. This value should be 4-64 characters and // must match the regular expression `^a-z ([a-z0-9-]{0,61}[a-z0-9])?$`. See -// go/aip/122#resource-id-segments +// aip.dev/122#resource-id-segments func (c *ProjectsLocationsAuthorizedViewSetsCreateCall) AuthorizedViewSetId(authorizedViewSetId string) *ProjectsLocationsAuthorizedViewSetsCreateCall { c.urlParams_.Set("authorizedViewSetId", authorizedViewSetId) return c @@ -14349,7 +14349,7 @@ func (r *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService) Create(paren // AuthorizedView's resource name. If no ID is specified, a server-generated ID // will be used. This value should be 4-64 characters and must match the // regular expression `^a-z ([a-z0-9-]{0,61}[a-z0-9])?$`. See -// go/aip/122#resource-id-segments +// aip.dev/122#resource-id-segments func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCreateCall) AuthorizedViewId(authorizedViewId string) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCreateCall { c.urlParams_.Set("authorizedViewId", authorizedViewId) return c diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 9034256b21..a095c8395e 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2660,7 +2660,7 @@ } } }, - "revision": "20250701", + "revision": "20250725", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2943,7 +2943,12 @@ "AutoIpamConfig": { "description": "AutoIpamConfig contains all information related to Auto IPAM", "id": "AutoIpamConfig", - "properties": {}, + "properties": { + "enabled": { + "description": "The flag that enables Auto IPAM on this cluster", + "type": "boolean" + } + }, "type": "object" }, "AutoMonitoringConfig": { @@ -2992,6 +2997,10 @@ "description": "Enable Autopilot", "type": "boolean" }, + "privilegedAdmissionConfig": { + "$ref": "PrivilegedAdmissionConfig", + "description": "PrivilegedAdmissionConfig is the configuration related to privileged admission control." + }, "workloadPolicyConfig": { "$ref": "WorkloadPolicyConfig", "description": "WorkloadPolicyConfig is the configuration related to GCW workload policy" @@ -3793,6 +3802,10 @@ ], "type": "string" }, + "defaultComputeClassConfig": { + "$ref": "DefaultComputeClassConfig", + "description": "Default compute class is a configuration for default compute class." + }, "enableNodeAutoprovisioning": { "description": "Enables automatic node pool creation and deletion.", "type": "boolean" @@ -4597,6 +4610,17 @@ }, "type": "object" }, + "DefaultComputeClassConfig": { + "description": "DefaultComputeClassConfig defines default compute class configuration.", + "id": "DefaultComputeClassConfig", + "properties": { + "enabled": { + "description": "Enables default compute class.", + "type": "boolean" + } + }, + "type": "object" + }, "DefaultSnatStatus": { "description": "DefaultSnatStatus contains the desired state of whether default sNAT should be disabled on the cluster.", "id": "DefaultSnatStatus", @@ -4854,6 +4878,18 @@ "readOnly": true, "type": "string" }, + "membershipType": { + "description": "The type of the cluster's fleet membership.", + "enum": [ + "MEMBERSHIP_TYPE_UNSPECIFIED", + "LIGHTWEIGHT" + ], + "enumDescriptions": [ + "The MembershipType is not set.", + "The membership supports only lightweight compatible features." + ], + "type": "string" + }, "preRegistered": { "description": "Output only. Whether the cluster has been registered through the fleet API.", "readOnly": true, @@ -7346,6 +7382,20 @@ }, "type": "object" }, + "PrivilegedAdmissionConfig": { + "description": "PrivilegedAdmissionConfig stores the list of authorized allowlist paths for the cluster.", + "id": "PrivilegedAdmissionConfig", + "properties": { + "allowlistPaths": { + "description": "The customer allowlist Cloud Storage paths for the cluster. These paths are used with the `--autopilot-privileged-admission` flag to authorize privileged workloads in Autopilot clusters. Paths can be GKE-owned, in the format `gke:////`, or customer-owned, in the format `gs:///`. Wildcards (`*`) are supported to authorize all allowlists under specific paths or directories. Example: `gs://my-bucket/*` will authorize all allowlists under the `my-bucket` bucket.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "PubSub": { "description": "Pub/Sub specific notification config.", "id": "PubSub", diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 074a64c7eb..c3b90488c1 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -645,6 +645,24 @@ func (s AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { // AutoIpamConfig: AutoIpamConfig contains all information related to Auto IPAM type AutoIpamConfig struct { + // Enabled: The flag that enables Auto IPAM on this cluster + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 AutoIpamConfig) MarshalJSON() ([]byte, error) { + type NoMethod AutoIpamConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // AutoMonitoringConfig: AutoMonitoringConfig defines the configuration for GKE @@ -708,6 +726,9 @@ func (s AutoUpgradeOptions) MarshalJSON() ([]byte, error) { type Autopilot struct { // Enabled: Enable Autopilot Enabled bool `json:"enabled,omitempty"` + // PrivilegedAdmissionConfig: PrivilegedAdmissionConfig is the configuration + // related to privileged admission control. + PrivilegedAdmissionConfig *PrivilegedAdmissionConfig `json:"privilegedAdmissionConfig,omitempty"` // WorkloadPolicyConfig: WorkloadPolicyConfig is the configuration related to // GCW workload policy WorkloadPolicyConfig *WorkloadPolicyConfig `json:"workloadPolicyConfig,omitempty"` @@ -1567,6 +1588,9 @@ type ClusterAutoscaling struct { // "OPTIMIZE_UTILIZATION" - Prioritize optimizing utilization of resources. // "BALANCED" - Use default (balanced) autoscaling configuration. AutoscalingProfile string `json:"autoscalingProfile,omitempty"` + // DefaultComputeClassConfig: Default compute class is a configuration for + // default compute class. + DefaultComputeClassConfig *DefaultComputeClassConfig `json:"defaultComputeClassConfig,omitempty"` // EnableNodeAutoprovisioning: Enables automatic node pool creation and // deletion. EnableNodeAutoprovisioning bool `json:"enableNodeAutoprovisioning,omitempty"` @@ -2460,6 +2484,29 @@ func (s DatabaseEncryption) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DefaultComputeClassConfig: DefaultComputeClassConfig defines default compute +// class configuration. +type DefaultComputeClassConfig struct { + // Enabled: Enables default compute class. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 DefaultComputeClassConfig) MarshalJSON() ([]byte, error) { + type NoMethod DefaultComputeClassConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DefaultSnatStatus: DefaultSnatStatus contains the desired state of whether // default sNAT should be disabled on the cluster. type DefaultSnatStatus struct { @@ -2866,6 +2913,13 @@ type Fleet struct { // membership of the cluster, in the format // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. Membership string `json:"membership,omitempty"` + // MembershipType: The type of the cluster's fleet membership. + // + // Possible values: + // "MEMBERSHIP_TYPE_UNSPECIFIED" - The MembershipType is not set. + // "LIGHTWEIGHT" - The membership supports only lightweight compatible + // features. + MembershipType string `json:"membershipType,omitempty"` // PreRegistered: Output only. Whether the cluster has been registered through // the fleet API. PreRegistered bool `json:"preRegistered,omitempty"` @@ -6133,6 +6187,35 @@ func (s PrivateRegistryAccessConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PrivilegedAdmissionConfig: PrivilegedAdmissionConfig stores the list of +// authorized allowlist paths for the cluster. +type PrivilegedAdmissionConfig struct { + // AllowlistPaths: The customer allowlist Cloud Storage paths for the cluster. + // These paths are used with the `--autopilot-privileged-admission` flag to + // authorize privileged workloads in Autopilot clusters. Paths can be + // GKE-owned, in the format `gke:////`, or customer-owned, in the format + // `gs:///`. Wildcards (`*`) are supported to authorize all allowlists under + // specific paths or directories. Example: `gs://my-bucket/*` will authorize + // all allowlists under the `my-bucket` bucket. + AllowlistPaths []string `json:"allowlistPaths,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowlistPaths") 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. "AllowlistPaths") 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 PrivilegedAdmissionConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrivilegedAdmissionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // PubSub: Pub/Sub specific notification config. type PubSub struct { // Enabled: Enable notifications for Pub/Sub. diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 0254177e8d..becdf74a42 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2685,7 +2685,7 @@ } } }, - "revision": "20250701", + "revision": "20250725", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2984,7 +2984,12 @@ "AutoIpamConfig": { "description": "AutoIpamConfig contains all information related to Auto IPAM", "id": "AutoIpamConfig", - "properties": {}, + "properties": { + "enabled": { + "description": "The flag that enables Auto IPAM on this cluster", + "type": "boolean" + } + }, "type": "object" }, "AutoMonitoringConfig": { @@ -3038,6 +3043,10 @@ "description": "Enable Autopilot", "type": "boolean" }, + "privilegedAdmissionConfig": { + "$ref": "PrivilegedAdmissionConfig", + "description": "PrivilegedAdmissionConfig is the configuration related to privileged admission control." + }, "workloadPolicyConfig": { "$ref": "WorkloadPolicyConfig", "description": "WorkloadPolicyConfig is the configuration related to GCW workload policy" @@ -3179,12 +3188,6 @@ }, "type": "object" }, - "AutoscaledRolloutPolicy": { - "description": "Autoscaled rollout policy uses cluster autoscaler during blue-green upgrades to scale both the green and blue pools.", - "id": "AutoscaledRolloutPolicy", - "properties": {}, - "type": "object" - }, "AvailableVersion": { "deprecated": true, "description": "Deprecated.", @@ -3324,10 +3327,6 @@ "description": "Settings for blue-green upgrade.", "id": "BlueGreenSettings", "properties": { - "autoscaledRolloutPolicy": { - "$ref": "AutoscaledRolloutPolicy", - "description": "Autoscaled policy for cluster autoscaler enabled blue-green upgrade." - }, "nodePoolSoakDuration": { "description": "Time needed after draining entire blue pool. After this period, blue pool will be cleaned up.", "format": "google-duration", @@ -3938,6 +3937,10 @@ ], "type": "string" }, + "defaultComputeClassConfig": { + "$ref": "DefaultComputeClassConfig", + "description": "Default compute class is a configuration for default compute class." + }, "enableNodeAutoprovisioning": { "description": "Enables automatic node pool creation and deletion.", "type": "boolean" @@ -4826,6 +4829,17 @@ }, "type": "object" }, + "DefaultComputeClassConfig": { + "description": "DefaultComputeClassConfig defines default compute class configuration.", + "id": "DefaultComputeClassConfig", + "properties": { + "enabled": { + "description": "Enables default compute class.", + "type": "boolean" + } + }, + "type": "object" + }, "DefaultSnatStatus": { "description": "DefaultSnatStatus contains the desired state of whether default sNAT should be disabled on the cluster.", "id": "DefaultSnatStatus", @@ -5095,6 +5109,18 @@ "readOnly": true, "type": "string" }, + "membershipType": { + "description": "The type of the cluster's fleet membership.", + "enum": [ + "MEMBERSHIP_TYPE_UNSPECIFIED", + "LIGHTWEIGHT" + ], + "enumDescriptions": [ + "The MembershipType is not set.", + "The membership supports only lightweight compatible features." + ], + "type": "string" + }, "preRegistered": { "description": "Output only. Whether the cluster has been registered through the fleet API.", "readOnly": true, @@ -7794,6 +7820,20 @@ }, "type": "object" }, + "PrivilegedAdmissionConfig": { + "description": "PrivilegedAdmissionConfig stores the list of authorized allowlist paths for the cluster.", + "id": "PrivilegedAdmissionConfig", + "properties": { + "allowlistPaths": { + "description": "The customer allowlist Cloud Storage paths for the cluster. These paths are used with the `--autopilot-privileged-admission` flag to authorize privileged workloads in Autopilot clusters. Paths can be GKE-owned, in the format `gke:////`, or customer-owned, in the format `gs:///`. Wildcards (`*`) are supported to authorize all allowlists under specific paths or directories. Example: `gs://my-bucket/*` will authorize all allowlists under the `my-bucket` bucket.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ProtectConfig": { "description": "ProtectConfig defines the flags needed to enable/disable features for the Protect API.", "id": "ProtectConfig", diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index 6c3119683d..0be051265b 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -655,6 +655,24 @@ func (s AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { // AutoIpamConfig: AutoIpamConfig contains all information related to Auto IPAM type AutoIpamConfig struct { + // Enabled: The flag that enables Auto IPAM on this cluster + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 AutoIpamConfig) MarshalJSON() ([]byte, error) { + type NoMethod AutoIpamConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // AutoMonitoringConfig: AutoMonitoringConfig defines the configuration for GKE @@ -720,6 +738,9 @@ type Autopilot struct { ConversionStatus *AutopilotConversionStatus `json:"conversionStatus,omitempty"` // Enabled: Enable Autopilot Enabled bool `json:"enabled,omitempty"` + // PrivilegedAdmissionConfig: PrivilegedAdmissionConfig is the configuration + // related to privileged admission control. + PrivilegedAdmissionConfig *PrivilegedAdmissionConfig `json:"privilegedAdmissionConfig,omitempty"` // WorkloadPolicyConfig: WorkloadPolicyConfig is the configuration related to // GCW workload policy WorkloadPolicyConfig *WorkloadPolicyConfig `json:"workloadPolicyConfig,omitempty"` @@ -912,11 +933,6 @@ func (s AutoprovisioningNodePoolDefaults) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// AutoscaledRolloutPolicy: Autoscaled rollout policy uses cluster autoscaler -// during blue-green upgrades to scale both the green and blue pools. -type AutoscaledRolloutPolicy struct { -} - // AvailableVersion: Deprecated. type AvailableVersion struct { // Reason: Reason for availability. @@ -1084,23 +1100,20 @@ func (s BlueGreenInfo) MarshalJSON() ([]byte, error) { // BlueGreenSettings: Settings for blue-green upgrade. type BlueGreenSettings struct { - // AutoscaledRolloutPolicy: Autoscaled policy for cluster autoscaler enabled - // blue-green upgrade. - AutoscaledRolloutPolicy *AutoscaledRolloutPolicy `json:"autoscaledRolloutPolicy,omitempty"` // NodePoolSoakDuration: Time needed after draining entire blue pool. After // this period, blue pool will be cleaned up. NodePoolSoakDuration string `json:"nodePoolSoakDuration,omitempty"` // StandardRolloutPolicy: Standard policy for the blue-green upgrade. StandardRolloutPolicy *StandardRolloutPolicy `json:"standardRolloutPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoscaledRolloutPolicy") to + // ForceSendFields is a list of field names (e.g. "NodePoolSoakDuration") 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. "AutoscaledRolloutPolicy") 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. "NodePoolSoakDuration") 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:"-"` } @@ -1692,6 +1705,9 @@ type ClusterAutoscaling struct { // "OPTIMIZE_UTILIZATION" - Prioritize optimizing utilization of resources. // "BALANCED" - Use default (balanced) autoscaling configuration. AutoscalingProfile string `json:"autoscalingProfile,omitempty"` + // DefaultComputeClassConfig: Default compute class is a configuration for + // default compute class. + DefaultComputeClassConfig *DefaultComputeClassConfig `json:"defaultComputeClassConfig,omitempty"` // EnableNodeAutoprovisioning: Enables automatic node pool creation and // deletion. EnableNodeAutoprovisioning bool `json:"enableNodeAutoprovisioning,omitempty"` @@ -2677,6 +2693,29 @@ func (s Date) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DefaultComputeClassConfig: DefaultComputeClassConfig defines default compute +// class configuration. +type DefaultComputeClassConfig struct { + // Enabled: Enables default compute class. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 DefaultComputeClassConfig) MarshalJSON() ([]byte, error) { + type NoMethod DefaultComputeClassConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DefaultSnatStatus: DefaultSnatStatus contains the desired state of whether // default sNAT should be disabled on the cluster. type DefaultSnatStatus struct { @@ -3115,6 +3154,13 @@ type Fleet struct { // membership of the cluster, in the format // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. Membership string `json:"membership,omitempty"` + // MembershipType: The type of the cluster's fleet membership. + // + // Possible values: + // "MEMBERSHIP_TYPE_UNSPECIFIED" - The MembershipType is not set. + // "LIGHTWEIGHT" - The membership supports only lightweight compatible + // features. + MembershipType string `json:"membershipType,omitempty"` // PreRegistered: Output only. Whether the cluster has been registered through // the fleet API. PreRegistered bool `json:"preRegistered,omitempty"` @@ -6645,6 +6691,35 @@ func (s PrivateRegistryAccessConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PrivilegedAdmissionConfig: PrivilegedAdmissionConfig stores the list of +// authorized allowlist paths for the cluster. +type PrivilegedAdmissionConfig struct { + // AllowlistPaths: The customer allowlist Cloud Storage paths for the cluster. + // These paths are used with the `--autopilot-privileged-admission` flag to + // authorize privileged workloads in Autopilot clusters. Paths can be + // GKE-owned, in the format `gke:////`, or customer-owned, in the format + // `gs:///`. Wildcards (`*`) are supported to authorize all allowlists under + // specific paths or directories. Example: `gs://my-bucket/*` will authorize + // all allowlists under the `my-bucket` bucket. + AllowlistPaths []string `json:"allowlistPaths,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowlistPaths") 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. "AllowlistPaths") 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 PrivilegedAdmissionConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrivilegedAdmissionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ProtectConfig: ProtectConfig defines the flags needed to enable/disable // features for the Protect API. type ProtectConfig struct { diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index bfd3a69c9d..3cf2b0326d 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -1470,6 +1470,190 @@ } } }, + "dataProducts": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataProducts/{dataProductsId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.dataProducts.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataProducts/{dataProductsId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.dataProducts.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataProducts/{dataProductsId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.dataProducts.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "dataAssets": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataProducts/{dataProductsId}/dataAssets/{dataAssetsId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.dataProducts.dataAssets.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/dataAssets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataProducts/{dataProductsId}/dataAssets/{dataAssetsId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.dataProducts.dataAssets.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/dataAssets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataProducts/{dataProductsId}/dataAssets/{dataAssetsId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.dataProducts.dataAssets.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/dataAssets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "dataScans": { "methods": { "create": { @@ -7027,7 +7211,7 @@ } } }, - "revision": "20250714", + "revision": "20250729", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index 9105442043..f433182259 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -218,6 +218,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.AspectTypes = NewProjectsLocationsAspectTypesService(s) rs.DataAttributeBindings = NewProjectsLocationsDataAttributeBindingsService(s) + rs.DataProducts = NewProjectsLocationsDataProductsService(s) rs.DataScans = NewProjectsLocationsDataScansService(s) rs.DataTaxonomies = NewProjectsLocationsDataTaxonomiesService(s) rs.EntryGroups = NewProjectsLocationsEntryGroupsService(s) @@ -238,6 +239,8 @@ type ProjectsLocationsService struct { DataAttributeBindings *ProjectsLocationsDataAttributeBindingsService + DataProducts *ProjectsLocationsDataProductsService + DataScans *ProjectsLocationsDataScansService DataTaxonomies *ProjectsLocationsDataTaxonomiesService @@ -277,6 +280,27 @@ type ProjectsLocationsDataAttributeBindingsService struct { s *Service } +func NewProjectsLocationsDataProductsService(s *Service) *ProjectsLocationsDataProductsService { + rs := &ProjectsLocationsDataProductsService{s: s} + rs.DataAssets = NewProjectsLocationsDataProductsDataAssetsService(s) + return rs +} + +type ProjectsLocationsDataProductsService struct { + s *Service + + DataAssets *ProjectsLocationsDataProductsDataAssetsService +} + +func NewProjectsLocationsDataProductsDataAssetsService(s *Service) *ProjectsLocationsDataProductsDataAssetsService { + rs := &ProjectsLocationsDataProductsDataAssetsService{s: s} + return rs +} + +type ProjectsLocationsDataProductsDataAssetsService struct { + s *Service +} + func NewProjectsLocationsDataScansService(s *Service) *ProjectsLocationsDataScansService { rs := &ProjectsLocationsDataScansService{s: s} rs.Jobs = NewProjectsLocationsDataScansJobsService(s) @@ -13082,6 +13106,704 @@ func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts . return ret, nil } +type ProjectsLocationsDataProductsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataProductsService) GetIamPolicy(resource string) *ProjectsLocationsDataProductsGetIamPolicyCall { + c := &ProjectsLocationsDataProductsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsDataProductsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataProductsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataProductsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataProductsGetIamPolicyCall { + 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 *ProjectsLocationsDataProductsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataProductsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataProductsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataProductsGetIamPolicyCall { + 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 *ProjectsLocationsDataProductsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataProductsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataProducts.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsDataProductsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDataProductsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataProductsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataProductsSetIamPolicyCall { + c := &ProjectsLocationsDataProductsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + 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 *ProjectsLocationsDataProductsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataProductsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataProductsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataProductsSetIamPolicyCall { + 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 *ProjectsLocationsDataProductsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataProductsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataProducts.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsDataProductsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDataProductsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsDataProductsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataProductsTestIamPermissionsCall { + c := &ProjectsLocationsDataProductsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsDataProductsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataProductsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataProductsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataProductsTestIamPermissionsCall { + 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 *ProjectsLocationsDataProductsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataProductsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataProducts.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsDataProductsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataProductsDataAssetsService) GetIamPolicy(resource string) *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall { + c := &ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall { + 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 *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall { + 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 *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.dataAssets.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataProducts.dataAssets.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsDataProductsDataAssetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.dataAssets.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataProductsDataAssetsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall { + c := &ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + 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 *ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall { + 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 *ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.dataAssets.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataProducts.dataAssets.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsDataProductsDataAssetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.dataAssets.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsDataProductsDataAssetsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall { + c := &ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall { + 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 *ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.dataAssets.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataProducts.dataAssets.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsDataProductsDataAssetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dataplex.projects.locations.dataProducts.dataAssets.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsDataScansCreateCall struct { s *Service parent string diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index fb7d93581f..42c064f985 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1261,7 +1261,7 @@ } } }, - "revision": "20250714", + "revision": "20250722", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AppendOnly": { @@ -1379,6 +1379,12 @@ "properties": {}, "type": "object" }, + "BasicEncryption": { + "description": "Message to represent the option where Datastream will enforce encryption without authenticating server identity. Server certificates will be trusted by default.", + "id": "BasicEncryption", + "properties": {}, + "type": "object" + }, "BigQueryDestinationConfig": { "description": "BigQuery destination configuration", "id": "BigQueryDestinationConfig", @@ -1724,6 +1730,27 @@ "properties": {}, "type": "object" }, + "EncryptionAndServerValidation": { + "description": "Message to represent the option where Datastream will enforce encryption and authenticate server identity. ca_certificate must be set if user selects this option.", + "id": "EncryptionAndServerValidation", + "properties": { + "caCertificate": { + "description": "Optional. Input only. PEM-encoded certificate of the CA that signed the source database server's certificate.", + "type": "string" + }, + "serverCertificateHostname": { + "description": "Optional. The hostname mentioned in the Subject or SAN extension of the server certificate. This field is used for bypassing the hostname validation while verifying server certificate. This is required for scenarios where the host name that datastream connects to is different from the certificate's subject. This specifically happens for private connectivity. It could also happen when the customer provides a public IP in connection profile but the same is not present in the server certificate.", + "type": "string" + } + }, + "type": "object" + }, + "EncryptionNotEnforced": { + "description": "Message to represent the option where encryption is not enforced. An empty message right now to allow future extensibility.", + "id": "EncryptionNotEnforced", + "properties": {}, + "type": "object" + }, "Error": { "description": "Represent a user-facing Error.", "id": "Error", @@ -3639,6 +3666,10 @@ "description": "Optional. A reference to a Secret Manager resource name storing the SQLServer connection password. Mutually exclusive with the `password` field.", "type": "string" }, + "sslConfig": { + "$ref": "SqlServerSslConfig", + "description": "Optional. SSL configuration for the SQLServer connection." + }, "username": { "description": "Required. Username for the SQLServer connection.", "type": "string" @@ -3711,6 +3742,25 @@ }, "type": "object" }, + "SqlServerSslConfig": { + "description": "SQL Server SSL configuration information.", + "id": "SqlServerSslConfig", + "properties": { + "basicEncryption": { + "$ref": "BasicEncryption", + "description": "If set, Datastream will enforce encryption without authenticating server identity. Server certificates will be trusted by default." + }, + "encryptionAndServerValidation": { + "$ref": "EncryptionAndServerValidation", + "description": "If set, Datastream will enforce encryption and authenticate server identity." + }, + "encryptionNotEnforced": { + "$ref": "EncryptionNotEnforced", + "description": "If set, Datastream will not enforce encryption. If the DB server mandates encryption, then connection will be encrypted but server identity will not be authenticated." + } + }, + "type": "object" + }, "SqlServerTable": { "description": "SQLServer table.", "id": "SqlServerTable", diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index e962c476be..17d60c031a 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -346,6 +346,12 @@ func (s BackfillJob) MarshalJSON() ([]byte, error) { type BackfillNoneStrategy struct { } +// BasicEncryption: Message to represent the option where Datastream will +// enforce encryption without authenticating server identity. Server +// certificates will be trusted by default. +type BasicEncryption struct { +} + // BigQueryDestinationConfig: BigQuery destination configuration type BigQueryDestinationConfig struct { // AppendOnly: Append only mode @@ -706,6 +712,44 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// EncryptionAndServerValidation: Message to represent the option where +// Datastream will enforce encryption and authenticate server identity. +// ca_certificate must be set if user selects this option. +type EncryptionAndServerValidation struct { + // CaCertificate: Optional. Input only. PEM-encoded certificate of the CA that + // signed the source database server's certificate. + CaCertificate string `json:"caCertificate,omitempty"` + // ServerCertificateHostname: Optional. The hostname mentioned in the Subject + // or SAN extension of the server certificate. This field is used for bypassing + // the hostname validation while verifying server certificate. This is required + // for scenarios where the host name that datastream connects to is different + // from the certificate's subject. This specifically happens for private + // connectivity. It could also happen when the customer provides a public IP in + // connection profile but the same is not present in the server certificate. + ServerCertificateHostname string `json:"serverCertificateHostname,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaCertificate") 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. "CaCertificate") 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 EncryptionAndServerValidation) MarshalJSON() ([]byte, error) { + type NoMethod EncryptionAndServerValidation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// EncryptionNotEnforced: Message to represent the option where encryption is +// not enforced. An empty message right now to allow future extensibility. +type EncryptionNotEnforced struct { +} + // Error: Represent a user-facing Error. type Error struct { // Details: Additional information about the error. @@ -3053,6 +3097,8 @@ type SqlServerProfile struct { // resource name storing the SQLServer connection password. Mutually exclusive // with the `password` field. SecretManagerStoredPassword string `json:"secretManagerStoredPassword,omitempty"` + // SslConfig: Optional. SSL configuration for the SQLServer connection. + SslConfig *SqlServerSslConfig `json:"sslConfig,omitempty"` // Username: Required. Username for the SQLServer connection. Username string `json:"username,omitempty"` // ForceSendFields is a list of field names (e.g. "Database") to @@ -3151,6 +3197,37 @@ func (s SqlServerSourceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SqlServerSslConfig: SQL Server SSL configuration information. +type SqlServerSslConfig struct { + // BasicEncryption: If set, Datastream will enforce encryption without + // authenticating server identity. Server certificates will be trusted by + // default. + BasicEncryption *BasicEncryption `json:"basicEncryption,omitempty"` + // EncryptionAndServerValidation: If set, Datastream will enforce encryption + // and authenticate server identity. + EncryptionAndServerValidation *EncryptionAndServerValidation `json:"encryptionAndServerValidation,omitempty"` + // EncryptionNotEnforced: If set, Datastream will not enforce encryption. If + // the DB server mandates encryption, then connection will be encrypted but + // server identity will not be authenticated. + EncryptionNotEnforced *EncryptionNotEnforced `json:"encryptionNotEnforced,omitempty"` + // ForceSendFields is a list of field names (e.g. "BasicEncryption") 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. "BasicEncryption") 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 SqlServerSslConfig) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerSslConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SqlServerTable: SQLServer table. type SqlServerTable struct { // Columns: SQLServer columns in the schema. When unspecified as part of diff --git a/dfareporting/v4/dfareporting-api.json b/dfareporting/v4/dfareporting-api.json index b99687c592..7db04867df 100644 --- a/dfareporting/v4/dfareporting-api.json +++ b/dfareporting/v4/dfareporting-api.json @@ -4630,6 +4630,120 @@ } } }, + "dynamicFeeds": { + "methods": { + "get": { + "description": "Gets a dynamic feed by ID.", + "flatPath": "studio/dynamicFeeds/{dynamicFeedsId}", + "httpMethod": "GET", + "id": "dfareporting.dynamicFeeds.get", + "parameterOrder": [ + "dynamicFeedId" + ], + "parameters": { + "dynamicFeedId": { + "description": "Required. Dynamic feed ID.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "studio/dynamicFeeds/{+dynamicFeedId}", + "response": { + "$ref": "DynamicFeed" + }, + "scopes": [ + "https://www.googleapis.com/auth/dfatrafficking" + ] + }, + "insert": { + "description": "Inserts a new dynamic feed.", + "flatPath": "studio/dynamicFeeds", + "httpMethod": "POST", + "id": "dfareporting.dynamicFeeds.insert", + "parameterOrder": [], + "parameters": {}, + "path": "studio/dynamicFeeds", + "request": { + "$ref": "DynamicFeedsInsertRequest" + }, + "response": { + "$ref": "DynamicFeed" + }, + "scopes": [ + "https://www.googleapis.com/auth/dfatrafficking" + ] + } + } + }, + "dynamicProfiles": { + "methods": { + "get": { + "description": "Gets a dynamic profile by ID.", + "flatPath": "studio/dynamicProfiles/{dynamicProfilesId}", + "httpMethod": "GET", + "id": "dfareporting.dynamicProfiles.get", + "parameterOrder": [ + "dynamicProfileId" + ], + "parameters": { + "dynamicProfileId": { + "description": "Required. Dynamic profile ID.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "studio/dynamicProfiles/{+dynamicProfileId}", + "response": { + "$ref": "DynamicProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/dfatrafficking" + ] + }, + "insert": { + "description": "Inserts a new dynamic profile.", + "flatPath": "studio/dynamicProfiles", + "httpMethod": "POST", + "id": "dfareporting.dynamicProfiles.insert", + "parameterOrder": [], + "parameters": {}, + "path": "studio/dynamicProfiles", + "request": { + "$ref": "DynamicProfile" + }, + "response": { + "$ref": "DynamicProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/dfatrafficking" + ] + }, + "update": { + "description": "Updates an existing dynamic profile.", + "flatPath": "studio/dynamicProfiles", + "httpMethod": "PUT", + "id": "dfareporting.dynamicProfiles.update", + "parameterOrder": [], + "parameters": {}, + "path": "studio/dynamicProfiles", + "request": { + "$ref": "DynamicProfile" + }, + "response": { + "$ref": "DynamicProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/dfatrafficking" + ] + } + } + }, "dynamicTargetingKeys": { "methods": { "delete": { @@ -10152,7 +10266,7 @@ } } }, - "revision": "20250602", + "revision": "20250722", "rootUrl": "https://dfareporting.googleapis.com/", "schemas": { "Account": { @@ -12171,6 +12285,81 @@ }, "type": "object" }, + "ContentSource": { + "description": "Contains the content source of the dynamic feed.", + "id": "ContentSource", + "properties": { + "contentSourceName": { + "description": "Optional. The name of the content source. It is defaulted to content source file name if not provided.", + "type": "string" + }, + "createInfo": { + "$ref": "LastModifiedInfo", + "description": "Output only. The creation timestamp of the content source. This is a read-only field.", + "readOnly": true + }, + "lastModifiedInfo": { + "$ref": "LastModifiedInfo", + "description": "Output only. The last modified timestamp of the content source. This is a read-only field.", + "readOnly": true + }, + "metaData": { + "$ref": "ContentSourceMetaData", + "description": "Output only. Metadata of the content source. It contains the number of rows and the column names from resource link. This is a read-only field.", + "readOnly": true + }, + "resourceLink": { + "description": "Required. The link to the file of the content source.", + "type": "string" + }, + "resourceType": { + "description": "Required. The resource type of the content source.", + "enum": [ + "RESOURCE_TYPE_UNSPECIFIED", + "RESOURCE_TYPE_GOOGLE_SPREADSHEET", + "RESOURCE_TYPE_REMOTE_FILE" + ], + "enumDescriptions": [ + "The resource type is unspecified.", + "The resource type is google spreadsheet.", + "The resource type is remote file." + ], + "type": "string" + } + }, + "type": "object" + }, + "ContentSourceMetaData": { + "description": "Contains the meta data of the content source. This is a read-only field.", + "id": "ContentSourceMetaData", + "properties": { + "charset": { + "description": "Output only. The charset of the content source.", + "readOnly": true, + "type": "string" + }, + "fieldNames": { + "description": "Output only. The list of column names in the content source.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "rowNumber": { + "description": "Output only. The number of rows in the content source.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "separator": { + "description": "Output only. The separator of the content source.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Conversion": { "description": "A Conversion represents when a user successfully performs a desired action after seeing an ad.", "id": "Conversion", @@ -14667,6 +14856,45 @@ }, "type": "object" }, + "CustomRule": { + "description": "Contains custom rule information.", + "id": "CustomRule", + "properties": { + "name": { + "description": "Optional. Name of this custom rule.", + "type": "string" + }, + "priority": { + "description": "Optional. Priority of the custom rule.", + "format": "int32", + "type": "integer" + }, + "ruleBlocks": { + "description": "Optional. A list of field filter, the custom rule will apply.", + "items": { + "$ref": "RuleBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "CustomValueField": { + "description": "Contains custom value field information.", + "id": "CustomValueField", + "properties": { + "fieldId": { + "description": "Optional. Field ID in the element.", + "format": "int32", + "type": "integer" + }, + "requestKey": { + "description": "Optional. Custom key used to match for auto filtering.", + "type": "string" + } + }, + "type": "object" + }, "CustomViewabilityMetric": { "description": "Custom Viewability Metric", "id": "CustomViewabilityMetric", @@ -14925,6 +15153,23 @@ }, "type": "object" }, + "DependentFieldValue": { + "description": "Contains dependent field value information.", + "id": "DependentFieldValue", + "properties": { + "elementId": { + "description": "Optional. The ID of the element that value's field will match against.", + "format": "int64", + "type": "string" + }, + "fieldId": { + "description": "Optional. The field id of the dependent field.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "DfpSettings": { "description": "Google Ad Manager Settings", "id": "DfpSettings", @@ -15204,109 +15449,462 @@ }, "type": "object" }, - "DynamicTargetingKey": { - "description": "Contains properties of a dynamic targeting key. Dynamic targeting keys are unique, user-friendly labels, created at the advertiser level in DCM, that can be assigned to ads, creatives, and placements and used for targeting with Studio dynamic creatives. Use these labels instead of numeric Campaign Manager IDs (such as placement IDs) to save time and avoid errors in your dynamic feeds.", - "id": "DynamicTargetingKey", + "DynamicFeed": { + "description": "Contains dynamic feed information.", + "id": "DynamicFeed", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#dynamicTargetingKey\".", - "type": "string" + "contentSource": { + "$ref": "ContentSource", + "description": "Required. The content source of the dynamic feed. This is a required field." }, - "name": { - "description": "Name of this dynamic targeting key. This is a required field. Must be less than 256 characters long and cannot contain commas. All characters are converted to lowercase.", - "type": "string" + "createInfo": { + "$ref": "LastModifiedInfo", + "description": "Output only. The creation timestamp of the dynamic feed. This is a read-only field.", + "readOnly": true }, - "objectId": { - "description": "ID of the object of this dynamic targeting key. This is a required field.", + "dynamicFeedId": { + "description": "Output only. Unique ID of this dynamic feed. This is a read-only, auto-generated field.", "format": "int64", + "readOnly": true, "type": "string" }, - "objectType": { - "description": "Type of the object of this dynamic targeting key. This is a required field.", + "dynamicFeedName": { + "description": "Optional. Name of this dynamic feed. It is defaulted to content source file name if not provided.", + "type": "string" + }, + "element": { + "$ref": "Element", + "description": "Required. The element of the dynamic feed that is to specify the schema of the feed. This is a required field." + }, + "feedIngestionStatus": { + "$ref": "FeedIngestionStatus", + "description": "Output only. The ingestion status of the dynamic feed. This is a read-only field.", + "readOnly": true + }, + "feedSchedule": { + "$ref": "FeedSchedule", + "description": "Optional. The schedule of the dynamic feed. It can be set if the feed is published." + }, + "hasPublished": { + "description": "Output only. Indicates whether the dynamic feed has a published version. This is a read-only field.", + "readOnly": true, + "type": "boolean" + }, + "lastModifiedInfo": { + "$ref": "LastModifiedInfo", + "description": "Output only. The last modified timestamp of the dynamic feed. This is a read-only field.", + "readOnly": true + }, + "status": { + "description": "Output only. The status of the feed. It is a read-only field that depends on the the feed ingestion status. The default value is INACTIVE, and it will be updated to ACTIVE once the feed is ingested successfully.", "enum": [ - "OBJECT_ADVERTISER", - "OBJECT_AD", - "OBJECT_CREATIVE", - "OBJECT_PLACEMENT" + "STATUS_UNKNOWN", + "ACTIVE", + "INACTIVE", + "DELETED" ], "enumDescriptions": [ - "", - "", - "", - "" + "The status is unknown.", + "The feedstatus is active.", + "The feed status is inactive.", + "The feed status is deleted." ], + "readOnly": true, + "type": "string" + }, + "studioAdvertiserId": { + "description": "Required. Advertiser ID of this dynamic feed. This is a required field.", + "format": "int64", "type": "string" } }, "type": "object" }, - "DynamicTargetingKeysListResponse": { - "description": "Dynamic Targeting Key List Response", - "id": "DynamicTargetingKeysListResponse", + "DynamicFeedsInsertRequest": { + "description": "Dynamic profile ID is required for dynamic feed insert as the current GPA API only can create a dynamic feed under profile context,even though the dynnamic feed itself don't need the dynamic profile id. See go/cm3-dco-display-api-interface", + "id": "DynamicFeedsInsertRequest", "properties": { - "dynamicTargetingKeys": { - "description": "Dynamic targeting key collection.", - "items": { - "$ref": "DynamicTargetingKey" - }, - "type": "array" + "dynamicFeed": { + "$ref": "DynamicFeed", + "description": "Required. Dynamic feed to insert." }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#dynamicTargetingKeysListResponse\".", + "dynamicProfileId": { + "description": "Required. Dynamic profile ID of the inserted dynamic feed.", + "format": "int64", "type": "string" } }, "type": "object" }, - "EncryptionInfo": { - "description": "A description of how user IDs are encrypted.", - "id": "EncryptionInfo", + "DynamicProfile": { + "description": "Contains dynamic profile information.", + "id": "DynamicProfile", "properties": { - "encryptionEntityId": { - "description": "The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer.", - "format": "int64", - "type": "string" + "active": { + "$ref": "DynamicProfileVersion", + "description": "Optional. Active version of the dynamic profile." }, - "encryptionEntityType": { - "description": "The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer.", + "archiveStatus": { + "description": "Optional. Archive status of this dynamic profile.", "enum": [ - "ENCRYPTION_ENTITY_TYPE_UNKNOWN", - "DCM_ACCOUNT", - "DCM_ADVERTISER", - "DBM_PARTNER", - "DBM_ADVERTISER", - "ADWORDS_CUSTOMER", - "DFP_NETWORK_CODE" + "ARCHIVE_STATUS_UNKNOWN", + "UNARCHIVED", + "ARCHIVED" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" + "The dynamic profile archive status is unknown. This value is unused.", + "The dynamic profile archive status is unarchived.", + "The dynamic profile archive status is archived." ], "type": "string" }, - "encryptionSource": { - "description": "Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer.", - "enum": [ - "ENCRYPTION_SCOPE_UNKNOWN", - "AD_SERVING", - "DATA_TRANSFER" - ], - "enumDescriptions": [ - "", - "", - "" - ], + "createInfo": { + "$ref": "LastModifiedInfo", + "description": "Output only. The creation timestamp of the dynamic profile. This is a read-only field.", + "readOnly": true + }, + "description": { + "description": "Optional. Description of this dynamic profile.", + "type": "string" + }, + "draft": { + "$ref": "DynamicProfileVersion", + "description": "Optional. Draft version of the dynamic profile." + }, + "dynamicProfileId": { + "description": "Output only. Unique ID of this dynamic profile. This is a read-only, auto-generated field.", + "format": "int64", + "readOnly": true, "type": "string" }, "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#encryptionInfo\".", + "description": "Output only. Identifies what kind of resource this is. Value: the fixed string \"dfareporting#dynamicProfile\".", + "readOnly": true, "type": "string" - } + }, + "lastModifiedInfo": { + "$ref": "LastModifiedInfo", + "description": "Output only. The last modified timestamp of the dynamic profile. This is a read-only field.", + "readOnly": true + }, + "name": { + "description": "Required. Identifier. Name of this dynamic profile. This is a required field and must be less than 256 characters long.", + "type": "string" + }, + "status": { + "description": "Optional. Status of this dynamic profile.", + "enum": [ + "STATUS_UNKNOWN", + "ACTIVE", + "INACTIVE", + "DELETED" + ], + "enumDescriptions": [ + "The dynamic profile status is unknown. This value is unused.", + "The dynamic profile is active.", + "The dynamic profile is inactive.", + "The dynamic profile is deleted." + ], + "type": "string" + }, + "studioAdvertiserId": { + "description": "Required. Advertiser ID of this dynamic profile. This is a required field on insertion.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "DynamicProfileFeedSettings": { + "description": "Contains dynamic profile specific settings for an associated dynamic feed.", + "id": "DynamicProfileFeedSettings", + "properties": { + "dynamicFeedId": { + "description": "Optional. Dynamic feed ID associated with dynamic profile version.", + "format": "int64", + "type": "string" + }, + "dynamicRules": { + "$ref": "DynamicRules", + "description": "Optional. Dynamic rules for row selection for the given dynamic feed in the given dynamic profile." + }, + "quantity": { + "description": "Optional. The number of this dynamic feed rows needed by the dynamic profile, default value is 1. Acceptable values are between 1 to 99, inclusive.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DynamicProfileVersion": { + "description": "Contains dynamic profile version information.", + "id": "DynamicProfileVersion", + "properties": { + "dynamicProfileFeedSettings": { + "description": "Optional. Associated dynamic feeds and their settings (including dynamic rules) for this dynamic profile version.", + "items": { + "$ref": "DynamicProfileFeedSettings" + }, + "type": "array" + }, + "versionId": { + "description": "Output only. Version ID of this dynamic profile version. This is a read-only, auto-generated field. -1 for draft version, 0+ for published versions.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "DynamicRules": { + "description": "Contains dynamic rules information.", + "id": "DynamicRules", + "properties": { + "autoTargetedFieldIds": { + "description": "Optional. List of field IDs in this element that should be auto-targeted. Applicable when rule type is AUTO.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "customRules": { + "description": "Optional. The custom rules of the dynamic feed, only applicable when rule type is CUSTOM.", + "items": { + "$ref": "CustomRule" + }, + "type": "array" + }, + "customValueFields": { + "description": "Optional. Mapping between field ID and custom key that are used to match for auto filtering.", + "items": { + "$ref": "CustomValueField" + }, + "type": "array" + }, + "proximityFilter": { + "$ref": "ProximityFilter", + "description": "Optional. The proximity targeting rules of the dynamic feed, only applicable when rule type is PROXIMITY_TARGETING." + }, + "remarketingValueAttributes": { + "description": "Optional. The link between an element field ID and a list of user attribute IDs.", + "items": { + "$ref": "RemarketingValueAttribute" + }, + "type": "array" + }, + "rotationType": { + "description": "Optional. The rotation type to select from eligible rows. Rotation type only apply when the filtering rule results in more than one eligible rows.", + "enum": [ + "ROTATION_TYPE_UNKNOWN", + "RANDOM", + "OPTIMIZED", + "WEIGHTED" + ], + "enumDescriptions": [ + "The rotation type is unknown. This value is unused.", + "The rotation type is random. It is the default value.", + "The rotation type is optimized.", + "The rotation type is weighted." + ], + "type": "string" + }, + "ruleType": { + "description": "Optional. The type of the rule, the default value is OPEN.", + "enum": [ + "RULE_SET_TYPE_UNKNOWN", + "OPEN", + "AUTO", + "CUSTOM", + "PROXIMITY_TARGETING" + ], + "enumDescriptions": [ + "The rule type is unknown. This value is unused.", + "The rule type is open, all feed rows are eligible for selection. This is the default value.", + "The rule type is auto, the feed rows are eligible for selection based on the automatic rules.", + "The rule type is custom, the feed rows are eligible for selection based on the custom rules.", + "The rule type is proximity targeting, the feed rows are eligible for selection based on the proximity targeting rules." + ], + "type": "string" + }, + "weightFieldId": { + "description": "Optional. The field ID for the feed that will be used for weighted rotation, only applicable when rotation type is WEIGHTED.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DynamicTargetingKey": { + "description": "Contains properties of a dynamic targeting key. Dynamic targeting keys are unique, user-friendly labels, created at the advertiser level in DCM, that can be assigned to ads, creatives, and placements and used for targeting with Studio dynamic creatives. Use these labels instead of numeric Campaign Manager IDs (such as placement IDs) to save time and avoid errors in your dynamic feeds.", + "id": "DynamicTargetingKey", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#dynamicTargetingKey\".", + "type": "string" + }, + "name": { + "description": "Name of this dynamic targeting key. This is a required field. Must be less than 256 characters long and cannot contain commas. All characters are converted to lowercase.", + "type": "string" + }, + "objectId": { + "description": "ID of the object of this dynamic targeting key. This is a required field.", + "format": "int64", + "type": "string" + }, + "objectType": { + "description": "Type of the object of this dynamic targeting key. This is a required field.", + "enum": [ + "OBJECT_ADVERTISER", + "OBJECT_AD", + "OBJECT_CREATIVE", + "OBJECT_PLACEMENT" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "DynamicTargetingKeysListResponse": { + "description": "Dynamic Targeting Key List Response", + "id": "DynamicTargetingKeysListResponse", + "properties": { + "dynamicTargetingKeys": { + "description": "Dynamic targeting key collection.", + "items": { + "$ref": "DynamicTargetingKey" + }, + "type": "array" + }, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#dynamicTargetingKeysListResponse\".", + "type": "string" + } + }, + "type": "object" + }, + "Element": { + "description": "Contains the element of the dynamic feed.", + "id": "Element", + "properties": { + "activeFieldId": { + "description": "Optional. The field ID to specify the active field in the feed.", + "format": "int32", + "type": "integer" + }, + "createInfo": { + "$ref": "LastModifiedInfo", + "description": "Output only. The creation timestamp of the element. This is a read-only field.", + "readOnly": true + }, + "defaultFieldId": { + "description": "Optional. The field ID to specify the field that represents the default field in the feed.", + "format": "int32", + "type": "integer" + }, + "elementName": { + "description": "Optional. The name of the element. It is defaulted to resource file name if not provided.", + "type": "string" + }, + "endTimestampFieldId": { + "description": "Optional. The field ID to specify the field that represents the end timestamp. Only applicable if you're planning to use scheduling in your dynamic creative.", + "format": "int32", + "type": "integer" + }, + "externalIdFieldId": { + "description": "Required. The field ID to specify the field used for uniquely identifying the feed row. This is a required field.", + "format": "int32", + "type": "integer" + }, + "feedFields": { + "description": "Required. The list of fields of the element. The field order and name should match the meta data in the content source source.", + "items": { + "$ref": "FeedField" + }, + "type": "array" + }, + "isLocalTimestamp": { + "description": "Optional. Whether the start and end timestamp is local timestamp. The default value is false which means start and end timestamp is in UTC.", + "type": "boolean" + }, + "lastModifiedInfo": { + "$ref": "LastModifiedInfo", + "description": "Output only. The last modified timestamp of the element. This is a read-only field.", + "readOnly": true + }, + "proximityTargetingFieldId": { + "description": "Optional. The field ID that specify field used for proximity targeting.", + "format": "int32", + "type": "integer" + }, + "reportingLabelFieldId": { + "description": "Required. The field ID to specify the field used for dynamic reporting in Campaign Manager 360.", + "format": "int32", + "type": "integer" + }, + "startTimestampFieldId": { + "description": "Optional. The field ID to specify the field that represents the start timestamp. Only applicable if you're planning to use scheduling in your dynamic creative.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "EncryptionInfo": { + "description": "A description of how user IDs are encrypted.", + "id": "EncryptionInfo", + "properties": { + "encryptionEntityId": { + "description": "The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer.", + "format": "int64", + "type": "string" + }, + "encryptionEntityType": { + "description": "The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer.", + "enum": [ + "ENCRYPTION_ENTITY_TYPE_UNKNOWN", + "DCM_ACCOUNT", + "DCM_ADVERTISER", + "DBM_PARTNER", + "DBM_ADVERTISER", + "ADWORDS_CUSTOMER", + "DFP_NETWORK_CODE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "encryptionSource": { + "description": "Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer.", + "enum": [ + "ENCRYPTION_SCOPE_UNKNOWN", + "AD_SERVING", + "DATA_TRANSFER" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#encryptionInfo\".", + "type": "string" + } }, "type": "object" }, @@ -15459,6 +16057,379 @@ }, "type": "object" }, + "FeedField": { + "description": "Each field of the element. This is a required field.", + "id": "FeedField", + "properties": { + "defaultValue": { + "description": "Optional. The default value of the field.", + "type": "string" + }, + "filterable": { + "description": "Optional. Whether the field is filterable. Could be set as true when the field type is any of the following and is not renderable: - STRING - BOOL - COUNTRY_CODE_ISO - CM360_SITE_ID - CM360_KEYWORD - CM360_CREATIVE_ID - CM360_PLACEMENT_ID - CM360_AD_ID - CM360_ADVERTISER_ID - CM360_CAMPAIGN_ID - CITY - REGION - POSTAL_CODE - METRO - CUSTOM_VALUE - REMARKETING_VALUE - GEO_CANONICAL - STRING_LIST - CREATIVE_DIMENSION - USERLIST_ID - CM360_DYNAMIC_TARGETING_KEY - DV360_LINE_ITEM_ID ", + "type": "boolean" + }, + "id": { + "description": "Required. The ID of the field. The ID is based on the column index starting from 0, and it should match the column index in the resource link.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. The name of the field.", + "type": "string" + }, + "renderable": { + "description": "Optional. Whether the field is able to display. Could be set as true when the field type is not in any of the following and the field is not filterable: - COUNTRY_CODE_ISO - CITY - REGION - POSTAL_CODE - METRO - GEO_CANONICAL - USERLIST_ID - CONTEXTUAL_KEYWORD - CM360_DYNAMIC_TARGETING_KEY - WEIGHT ", + "type": "boolean" + }, + "required": { + "description": "Optional. Whether the field is required and should not be empty in the feed. Could be set as true when the field type is any of the following: - GPA_SERVED_IMAGE_URL - GPA_SERVED_ASSET_URL - ASSET_LIBRARY_HANDLE - ASSET_LIBRARY_VIDEO_HANDLE - ASSET_LIBRARY_DIRECTORY_HANDLE ", + "type": "boolean" + }, + "type": { + "description": "Required. The type of the field.", + "enum": [ + "TYPE_UNKNOWN", + "STRING", + "LONG", + "GPA_SERVED_IMAGE_URL", + "GPA_SERVED_ASSET_URL", + "COUNTRY_CODE_ISO", + "FLOAT", + "CM360_KEYWORD", + "CM360_SITE_ID", + "BOOL", + "EXIT_URL", + "DATETIME", + "CM360_CREATIVE_ID", + "CM360_PLACEMENT_ID", + "CM360_AD_ID", + "CM360_ADVERTISER_ID", + "CM360_CAMPAIGN_ID", + "CITY", + "REGION", + "POSTAL_CODE", + "METRO", + "CUSTOM_VALUE", + "REMARKETING_VALUE", + "GEO_CANONICAL", + "WEIGHT", + "STRING_LIST", + "CREATIVE_DIMENSION", + "USERLIST_ID", + "ASSET_LIBRARY_DIRECTORY_HANDLE", + "ASSET_LIBRARY_VIDEO_HANDLE", + "ASSET_LIBRARY_HANDLE", + "THIRD_PARTY_SERVED_URL", + "CM360_DYNAMIC_TARGETING_KEY", + "DV360_LINE_ITEM_ID" + ], + "enumDescriptions": [ + "The type is unspecified. This is an unused value.", + "The field type is text.", + "The field type is whole number.", + "The field type is image url", + "The field type is asset url.", + "The field type is the ISO 3166-2 alpha-2 codes. It is two-letter country codes defined in ISO 3166-1 published by the International Organization for Standardization.", + "The field type is decimal.", + "The field type is custom CM360 ad tag parameter.", + "The field type is CM360 site ID.", + "The field type is boolean.", + "The field type is exit url.", + "The field type is datetime.", + "The field type is CM360 creative ID.", + "The field type is CM360 placement ID.", + "The field type is CM360 ad ID.", + "The field type is CM360 advertiser ID.", + "The field type is CM360 campaign ID.", + "The field type is cities.", + "The field type is region.", + "The field type is postal code.", + "The field type is metro code.", + "The field type is custom value.", + "The field type is remarketing value.", + "The field type is accurate geographic type.", + "The field type is weight.", + "The field type is a list of values.", + "The field type is creative dimension.", + "The field type is CM/DV360 Audience ID.", + "The field type is AssetLibrary directory path.", + "The field type is AssetLibrary video file path.", + "The field type is AssetLibrary path.", + "The field type is third party served url.", + "The field type is CM dynamic targeting key.", + "The field type is DV360 line item ID." + ], + "type": "string" + } + }, + "type": "object" + }, + "FeedIngestionStatus": { + "description": "Contains the ingestion status of the dynamic feed. Feed ingestion is an asynchronous process. If the feed create request is successful, feed ingestion will be processed in the background, including validation, assets retrieval, and saving the data from the resource link. The processing time is dependent on the data size in the resource link. This read-only status field contains the current stage of that processing and its ingestion state.", + "id": "FeedIngestionStatus", + "properties": { + "ingestionErrorRecords": { + "description": "Output only. The ingestion error records of the feed.", + "items": { + "$ref": "IngestionErrorRecord" + }, + "readOnly": true, + "type": "array" + }, + "ingestionStatus": { + "$ref": "IngestionStatus", + "description": "Output only. The ingestion status of the feed.", + "readOnly": true + }, + "state": { + "description": "Output only. The processing state of the feed.", + "enum": [ + "FEED_PROCESSING_STATE_UNKNOWN", + "CANCELLED", + "INGESTING_QUEUED", + "INGESTING", + "INGESTED_SUCCESS", + "INGESTED_FAILURE", + "REQUEST_TO_PUBLISH", + "PUBLISHING", + "PUBLISHED_SUCCESS", + "PUBLISHED_FAILURE" + ], + "enumDescriptions": [ + "The feed processing state is unknown.", + "The feed processing state is cancelled.", + "The feed processing state is ingesting queued.", + "The feed processing state is ingesting.", + "The feed processing state is ingested successfully.", + "The feed processing state is ingested with failure.", + "The feed processing state is request to publish.", + "The feed processing state is publishing.", + "The feed processing state is published successfully.", + "The feed processing state is published with failure." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "FeedSchedule": { + "description": "Contains the schedule of the dynamic feed.", + "id": "FeedSchedule", + "properties": { + "repeatValue": { + "description": "Optional. The number of times the feed retransforms within one day. This is a required field if the schedule is enabled. Acceptable values are between 1 to 6, inclusive.", + "format": "int64", + "type": "string" + }, + "scheduleEnabled": { + "description": "Optional. Whether the schedule is enabled.", + "type": "boolean" + }, + "startHour": { + "description": "Optional. The hour of the day to start the feed. It is applicable if the repeat value is equal to 1. Default value is 0.", + "type": "string" + }, + "startMinute": { + "description": "Optional. The minute of the hour to start the feed. It is applicable if the repeat value is equal to 1. Default value is 0.", + "type": "string" + }, + "timeZone": { + "description": "Optional. The time zone to schedule the feed. It is applicable if the repeat value is equal to 1. Default value is \"America/Los_Angeles\".", + "type": "string" + } + }, + "type": "object" + }, + "FieldError": { + "description": "Contains the field error of the dynamic feed.", + "id": "FieldError", + "properties": { + "fieldId": { + "description": "Output only. The ID of the field.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "fieldName": { + "description": "Output only. The name of the field.", + "readOnly": true, + "type": "string" + }, + "fieldValues": { + "description": "Output only. The list of values of the field.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "ingestionError": { + "description": "Output only. The ingestion error of the field.", + "enum": [ + "UNKNOWN_PARSING_ERROR", + "MISSING_ID", + "MISSING_REPORTING_LABEL", + "EMPTY_VALUE", + "ASSET_DOWNLOAD_ERROR", + "ID_TOO_LONG", + "DUPLICATE_ID", + "PARSING_ERROR", + "COUNTRY_PARSING_ERROR", + "LONG_PARSING_ERROR", + "BOOL_PARSING_ERROR", + "EXPANDED_URL_PARSING_ERROR", + "FLOAT_PARSING_ERROR", + "DATETIME_PARSING_ERROR", + "INVALID_PREFERENCE_VALUE", + "GEO_NOT_FOUND_ERROR", + "GEO_PARSING_ERROR", + "GEO_PROXIMITY_TARGETING_MULTIPLE_LOCATION_ERROR", + "POSTAL_CODE_PARSING_ERROR", + "METRO_CODE_PARSING_ERROR", + "DATETIME_WITHOUT_TIMEZONE_PARSING_ERROR", + "WEIGHT_PARSING_ERROR", + "CREATIVE_DIMENSION_PARSING_ERROR", + "MULTIVALUE_ID", + "ENDTIME_BEFORE_STARTTIME", + "INVALID_ASSET_LIBRARY_HANDLE", + "INVALID_ASSET_LIBRARY_VIDEO_HANDLE", + "INVALID_ASSET_LIBRARY_DIRECTORY_HANDLE", + "DYNAMIC_TARGETING_KEY_NOT_DEFINED_FOR_ADVERTISER", + "USERLIST_ID_NOT_ACCESSIBLE_FOR_ADVERTISER", + "ENDTIME_PASSED", + "ENDTIME_TOO_SOON", + "TEXT_ASSET_REFERENCE", + "IMAGE_ASSET_SCS_REFERENCE", + "AIRPORT_GEO_TARGET", + "CANONICAL_NAME_QUERY_MISMATCH", + "NO_DEFAULT_ROW", + "NO_ACTIVE_DEFAULT_ROW", + "NO_DEFAULT_ROW_IN_DATE_RANGE", + "NO_ACTIVE_DEFAULT_ROW_IN_DATE_RANGE", + "PAYLOAD_LIMIT_EXCEEDED", + "SSL_NOT_COMPLIANT" + ], + "enumDescriptions": [ + "The ingestion error is unknown.", + "The ingestion error when the ID value is missing.", + "The ingestion error when the element value name used for reporting is missing.", + "The ingestion error when a required value is empty", + "The ingestion error when asset retrieval fails for a particular image or asset.", + "The ingestion error when the ID value exceeds the string length limit.", + "The ingestion error when the ID value is duplicate.", + "The ingestion error when parsing the field fails.", + "The ingestion error when parsing the country code fails.", + "The ingestion error when parsing the long value fails.", + "The ingestion error when parsing the boolean value fails.", + "The ingestion error when parsing the expanded url fails.", + "The ingestion error when parsing the float value fails.", + "The ingestion error when parsing the datetime value fails.", + "The ingestion error when the preference value is not a positive float.", + "The ingestion error when a geo location is not found.", + "The ingestion error when parsing the geo field fails.", + "The ingestion error when a feed row has multiple geotargets with proximity targeting enabled.", + "The ingestion error when parsing the postal code value fails.", + "The ingestion error when parsing the metro code value fails.", + "The ingestion error when parsing the datetime value fails.", + "The ingestion error when parsing the weight value fails.", + "The ingestion error when parsing the creative dimension value fails.", + "The ingestion error when a STRING_LIST type ID has multiple values.", + "The ingestion error when the end time is before the start time.", + "The ingestion error when the asset library handle is invalid.", + "The ingestion error when the asset library video handle is invalid.", + "The ingestion error when the asset library directory handle is invalid.", + "The ingestion error when a targeting key used but not defined for the CM360 Advertiser.", + "The ingestion error when the userlist ID is not accessible for the CM360 Advertiser.", + "The ingestion error when the end time is passed.", + "The ingestion error when the end time is in the near future (i.e., \u003c7 days).", + "The ingestion error when a text field specifies a reference to an asset.", + "The ingestion error when Image field specifies a reference to an asset hosted on SCS (s0.2mdn.net/s0qa.2mdn.net).", + "The ingestion error when a geo target is an airport.", + "The ingestion error when the geo target's canonical name does not match the query string used to obtain it.", + "The ingestion error or warning when the default row is not set.", + "The ingestion error or warning when the default row is not active.", + "The ingestion error or warning when the default row is not in the date range.", + "The ingestion error or warning when the default row is not in the date range.", + "The ingestion error when when the payload of the record is above a threshold.", + "The ingestion error or warning when the field is not SSL compliant." + ], + "readOnly": true, + "type": "string" + }, + "isError": { + "description": "Output only. Incidcates whether the field has error or warning.", + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, + "FieldFilter": { + "description": "Contains field filter information.", + "id": "FieldFilter", + "properties": { + "boolValue": { + "description": "Optional. The boolean values, only applicable when rhs_value_type is BOOL.", + "type": "boolean" + }, + "dependentFieldValue": { + "$ref": "DependentFieldValue", + "description": "Optional. The dependent values, only applicable when rhs_value_type is DEPENDENT." + }, + "fieldId": { + "description": "Optional. The field ID on the left hand side of the expression.", + "format": "int32", + "type": "integer" + }, + "matchType": { + "description": "Optional. Left hand side of the expression match type.", + "enum": [ + "LHS_MATCH_TYPE_UNKNOWN", + "EQUALS_OR_UNRESTRICTED", + "EQUALS", + "UNRESTRICTED", + "NOT_EQUALS" + ], + "enumDescriptions": [ + "The left hand side of the expression is unknown. This value is unused.", + "The left hand side of the expression is equals or unrestricted. It is the default value.", + "The left hand side of the expression is equals.", + "The left hand side of the expression is unrestricted. Unrestricted is used to target fields with no restrictions. For example, country targeting fields hold a list of countries. If the list is empty, we consider the element value to have no restrictions.", + "Left hand side of the expression is not equals. Not equals specifies which fields should not be targeted." + ], + "type": "string" + }, + "requestValue": { + "$ref": "RequestValue", + "description": "Optional. The request value, only applicable when rhs_value_type is REQUEST." + }, + "stringValue": { + "description": "Optional. The string value, only applicable when rhs_value_type is STRING.", + "type": "string" + }, + "valueType": { + "description": "Optional. Right hand side of the expression.", + "enum": [ + "RHS_VALUE_TYPE_UNKNOWN", + "STRING", + "REQUEST", + "BOOL", + "DEPENDENT" + ], + "enumDescriptions": [ + "The right hand side of the expression is unknown. This value is unused.", + "The right hand side of the expression is a string.", + "The right hand side of the expression is a request value.", + "The right hand side of the expression is a boolean.", + "The right hand side of the expression is a dependent field value." + ], + "type": "string" + } + }, + "type": "object" + }, "File": { "description": "Represents a File resource. A file contains the metadata for a report run. It shows the status of the run and holds the URLs to the generated report data if the run is finished and the status is \"REPORT_AVAILABLE\".", "id": "File", @@ -16442,6 +17413,63 @@ }, "type": "object" }, + "IngestionErrorRecord": { + "description": "Contains the ingestion error record of the dynamic feed. limited to 100 records.", + "id": "IngestionErrorRecord", + "properties": { + "errors": { + "description": "Output only. The list of field errors of the ingestion error record.", + "items": { + "$ref": "FieldError" + }, + "readOnly": true, + "type": "array" + }, + "recordId": { + "description": "Output only. The record ID of the ingestion error record.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "IngestionStatus": { + "description": "Contains the ingestion status of the dynamic feed.", + "id": "IngestionStatus", + "properties": { + "numActiveRows": { + "description": "Output only. The number of active rows in the feed.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "numRowsProcessed": { + "description": "Output only. The number of rows processed in the feed.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "numRowsTotal": { + "description": "Output only. The total number of rows in the feed.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "numRowsWithErrors": { + "description": "Output only. The number of rows with errors in the feed.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "numWarningsTotal": { + "description": "Output only. The total number of warnings in the feed.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "InventoryItem": { "description": "Represents a buy from the Planning inventory store.", "id": "InventoryItem", @@ -18868,6 +19896,57 @@ }, "type": "object" }, + "ProximityFilter": { + "description": "Contains proximity filter information.", + "id": "ProximityFilter", + "properties": { + "fieldId": { + "description": "Optional. Field ID in the element.", + "format": "int32", + "type": "integer" + }, + "radiusBucketType": { + "description": "Optional. The radius bucket type of the proximity filter", + "enum": [ + "RADIUS_BUCKET_TYPE_UNKNOWN", + "SMALL", + "MEDIUM", + "LARGE", + "MULTI_REGIONAL", + "NATIONAL" + ], + "enumDescriptions": [ + "The radius bucket type is unknown.", + "The radius bucket type is small.", + "The radius bucket type is medium.", + "The radius bucket type is large.", + "The radius bucket type is multi-regional.", + "The radius bucket type is national." + ], + "type": "string" + }, + "radiusUnitType": { + "description": "Optional. The units of the radius value", + "enum": [ + "RADIUS_UNIT_TYPE_UNKNOWN", + "KILOMETERS", + "MILES" + ], + "enumDescriptions": [ + "The units of the radius value are unknown. This value is unused.", + "The units of the radius value are kilometers.", + "The units of the radius value are miles." + ], + "type": "string" + }, + "radiusValue": { + "description": "Optional. Radius length in units defined by radius_units.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "ReachReportCompatibleFields": { "description": "Represents fields that are compatible to be selected for a report of type \"REACH\".", "id": "ReachReportCompatibleFields", @@ -19137,6 +20216,26 @@ }, "type": "object" }, + "RemarketingValueAttribute": { + "description": "Contains remarketing value attribute information.", + "id": "RemarketingValueAttribute", + "properties": { + "fieldId": { + "description": "Optional. Field ID in the element.", + "format": "int32", + "type": "integer" + }, + "userAttributeIds": { + "description": "Optional. Remarketing user attribute IDs for auto filtering.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Report": { "description": "Represents a Report resource.", "id": "Report", @@ -19744,6 +20843,33 @@ }, "type": "object" }, + "RequestValue": { + "description": "Contains request value information.", + "id": "RequestValue", + "properties": { + "excludeFromUserAttributeIds": { + "description": "Optional. User attribute IDs in the request that should be excluded. Used only when the field type is REMARKETING_VALUE or USER_ATTRIBUTE_ID.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "key": { + "description": "Optional. Custom key in the request. Used only when the field type is CUSTOM_VALUE.", + "type": "string" + }, + "userAttributeIds": { + "description": "Optional. User attribute IDs in the request. Used only when the field type is REMARKETING_VALUE or USER_ATTRIBUTE_ID.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "RichMediaExitOverride": { "description": "Rich Media Exit Override.", "id": "RichMediaExitOverride", @@ -19785,6 +20911,20 @@ }, "type": "object" }, + "RuleBlock": { + "description": "Contains a list of field filters that the given custom rule will apply.", + "id": "RuleBlock", + "properties": { + "fieldFilter": { + "description": "Optional. A list of non-auto field filters", + "items": { + "$ref": "FieldFilter" + }, + "type": "array" + } + }, + "type": "object" + }, "Site": { "description": "Contains properties of a site.", "id": "Site", diff --git a/dfareporting/v4/dfareporting-gen.go b/dfareporting/v4/dfareporting-gen.go index 94b7c1dec2..415859a7a6 100644 --- a/dfareporting/v4/dfareporting-gen.go +++ b/dfareporting/v4/dfareporting-gen.go @@ -161,6 +161,8 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err s.Creatives = NewCreativesService(s) s.DimensionValues = NewDimensionValuesService(s) s.DirectorySites = NewDirectorySitesService(s) + s.DynamicFeeds = NewDynamicFeedsService(s) + s.DynamicProfiles = NewDynamicProfilesService(s) s.DynamicTargetingKeys = NewDynamicTargetingKeysService(s) s.EventTags = NewEventTagsService(s) s.Files = NewFilesService(s) @@ -279,6 +281,10 @@ type Service struct { DirectorySites *DirectorySitesService + DynamicFeeds *DynamicFeedsService + + DynamicProfiles *DynamicProfilesService + DynamicTargetingKeys *DynamicTargetingKeysService EventTags *EventTagsService @@ -620,6 +626,24 @@ type DirectorySitesService struct { s *Service } +func NewDynamicFeedsService(s *Service) *DynamicFeedsService { + rs := &DynamicFeedsService{s: s} + return rs +} + +type DynamicFeedsService struct { + s *Service +} + +func NewDynamicProfilesService(s *Service) *DynamicProfilesService { + rs := &DynamicProfilesService{s: s} + return rs +} + +type DynamicProfilesService struct { + s *Service +} + func NewDynamicTargetingKeysService(s *Service) *DynamicTargetingKeysService { rs := &DynamicTargetingKeysService{s: s} return rs @@ -3147,6 +3171,78 @@ func (s ContentCategory) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ContentSource: Contains the content source of the dynamic feed. +type ContentSource struct { + // ContentSourceName: Optional. The name of the content source. It is defaulted + // to content source file name if not provided. + ContentSourceName string `json:"contentSourceName,omitempty"` + // CreateInfo: Output only. The creation timestamp of the content source. This + // is a read-only field. + CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"` + // LastModifiedInfo: Output only. The last modified timestamp of the content + // source. This is a read-only field. + LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"` + // MetaData: Output only. Metadata of the content source. It contains the + // number of rows and the column names from resource link. This is a read-only + // field. + MetaData *ContentSourceMetaData `json:"metaData,omitempty"` + // ResourceLink: Required. The link to the file of the content source. + ResourceLink string `json:"resourceLink,omitempty"` + // ResourceType: Required. The resource type of the content source. + // + // Possible values: + // "RESOURCE_TYPE_UNSPECIFIED" - The resource type is unspecified. + // "RESOURCE_TYPE_GOOGLE_SPREADSHEET" - The resource type is google + // spreadsheet. + // "RESOURCE_TYPE_REMOTE_FILE" - The resource type is remote file. + ResourceType string `json:"resourceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentSourceName") 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. "ContentSourceName") 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 ContentSource) MarshalJSON() ([]byte, error) { + type NoMethod ContentSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ContentSourceMetaData: Contains the meta data of the content source. This is +// a read-only field. +type ContentSourceMetaData struct { + // Charset: Output only. The charset of the content source. + Charset string `json:"charset,omitempty"` + // FieldNames: Output only. The list of column names in the content source. + FieldNames []string `json:"fieldNames,omitempty"` + // RowNumber: Output only. The number of rows in the content source. + RowNumber int64 `json:"rowNumber,omitempty"` + // Separator: Output only. The separator of the content source. + Separator string `json:"separator,omitempty"` + // ForceSendFields is a list of field names (e.g. "Charset") 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. "Charset") 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 ContentSourceMetaData) MarshalJSON() ([]byte, error) { + type NoMethod ContentSourceMetaData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Conversion: A Conversion represents when a user successfully performs a // desired action after seeing an ad. type Conversion struct { @@ -5398,6 +5494,56 @@ func (s CustomRichMediaEvents) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CustomRule: Contains custom rule information. +type CustomRule struct { + // Name: Optional. Name of this custom rule. + Name string `json:"name,omitempty"` + // Priority: Optional. Priority of the custom rule. + Priority int64 `json:"priority,omitempty"` + // RuleBlocks: Optional. A list of field filter, the custom rule will apply. + RuleBlocks []*RuleBlock `json:"ruleBlocks,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 + // 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. "Name") 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 CustomRule) MarshalJSON() ([]byte, error) { + type NoMethod CustomRule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CustomValueField: Contains custom value field information. +type CustomValueField struct { + // FieldId: Optional. Field ID in the element. + FieldId int64 `json:"fieldId,omitempty"` + // RequestKey: Optional. Custom key used to match for auto filtering. + RequestKey string `json:"requestKey,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldId") 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. "FieldId") 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 CustomValueField) MarshalJSON() ([]byte, error) { + type NoMethod CustomValueField + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CustomViewabilityMetric: Custom Viewability Metric type CustomViewabilityMetric struct { // Configuration: Configuration of the custom viewability metric. @@ -5664,6 +5810,31 @@ func (s DeliverySchedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DependentFieldValue: Contains dependent field value information. +type DependentFieldValue struct { + // ElementId: Optional. The ID of the element that value's field will match + // against. + ElementId int64 `json:"elementId,omitempty,string"` + // FieldId: Optional. The field id of the dependent field. + FieldId int64 `json:"fieldId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ElementId") 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. "ElementId") 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 DependentFieldValue) MarshalJSON() ([]byte, error) { + type NoMethod DependentFieldValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DfpSettings: Google Ad Manager Settings type DfpSettings struct { // DfpNetworkCode: Ad Manager network code for this directory site. @@ -5985,6 +6156,280 @@ func (s DirectorySitesListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DynamicFeed: Contains dynamic feed information. +type DynamicFeed struct { + // ContentSource: Required. The content source of the dynamic feed. This is a + // required field. + ContentSource *ContentSource `json:"contentSource,omitempty"` + // CreateInfo: Output only. The creation timestamp of the dynamic feed. This is + // a read-only field. + CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"` + // DynamicFeedId: Output only. Unique ID of this dynamic feed. This is a + // read-only, auto-generated field. + DynamicFeedId int64 `json:"dynamicFeedId,omitempty,string"` + // DynamicFeedName: Optional. Name of this dynamic feed. It is defaulted to + // content source file name if not provided. + DynamicFeedName string `json:"dynamicFeedName,omitempty"` + // Element: Required. The element of the dynamic feed that is to specify the + // schema of the feed. This is a required field. + Element *Element `json:"element,omitempty"` + // FeedIngestionStatus: Output only. The ingestion status of the dynamic feed. + // This is a read-only field. + FeedIngestionStatus *FeedIngestionStatus `json:"feedIngestionStatus,omitempty"` + // FeedSchedule: Optional. The schedule of the dynamic feed. It can be set if + // the feed is published. + FeedSchedule *FeedSchedule `json:"feedSchedule,omitempty"` + // HasPublished: Output only. Indicates whether the dynamic feed has a + // published version. This is a read-only field. + HasPublished bool `json:"hasPublished,omitempty"` + // LastModifiedInfo: Output only. The last modified timestamp of the dynamic + // feed. This is a read-only field. + LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"` + // Status: Output only. The status of the feed. It is a read-only field that + // depends on the the feed ingestion status. The default value is INACTIVE, and + // it will be updated to ACTIVE once the feed is ingested successfully. + // + // Possible values: + // "STATUS_UNKNOWN" - The status is unknown. + // "ACTIVE" - The feedstatus is active. + // "INACTIVE" - The feed status is inactive. + // "DELETED" - The feed status is deleted. + Status string `json:"status,omitempty"` + // StudioAdvertiserId: Required. Advertiser ID of this dynamic feed. This is a + // required field. + StudioAdvertiserId int64 `json:"studioAdvertiserId,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. "ContentSource") 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. "ContentSource") 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 DynamicFeed) MarshalJSON() ([]byte, error) { + type NoMethod DynamicFeed + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DynamicFeedsInsertRequest: Dynamic profile ID is required for dynamic feed +// insert as the current GPA API only can create a dynamic feed under profile +// context,even though the dynnamic feed itself don't need the dynamic profile +// id. See go/cm3-dco-display-api-interface +type DynamicFeedsInsertRequest struct { + // DynamicFeed: Required. Dynamic feed to insert. + DynamicFeed *DynamicFeed `json:"dynamicFeed,omitempty"` + // DynamicProfileId: Required. Dynamic profile ID of the inserted dynamic feed. + DynamicProfileId int64 `json:"dynamicProfileId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "DynamicFeed") 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. "DynamicFeed") 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 DynamicFeedsInsertRequest) MarshalJSON() ([]byte, error) { + type NoMethod DynamicFeedsInsertRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DynamicProfile: Contains dynamic profile information. +type DynamicProfile struct { + // Active: Optional. Active version of the dynamic profile. + Active *DynamicProfileVersion `json:"active,omitempty"` + // ArchiveStatus: Optional. Archive status of this dynamic profile. + // + // Possible values: + // "ARCHIVE_STATUS_UNKNOWN" - The dynamic profile archive status is unknown. + // This value is unused. + // "UNARCHIVED" - The dynamic profile archive status is unarchived. + // "ARCHIVED" - The dynamic profile archive status is archived. + ArchiveStatus string `json:"archiveStatus,omitempty"` + // CreateInfo: Output only. The creation timestamp of the dynamic profile. This + // is a read-only field. + CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"` + // Description: Optional. Description of this dynamic profile. + Description string `json:"description,omitempty"` + // Draft: Optional. Draft version of the dynamic profile. + Draft *DynamicProfileVersion `json:"draft,omitempty"` + // DynamicProfileId: Output only. Unique ID of this dynamic profile. This is a + // read-only, auto-generated field. + DynamicProfileId int64 `json:"dynamicProfileId,omitempty,string"` + // Kind: Output only. Identifies what kind of resource this is. Value: the + // fixed string "dfareporting#dynamicProfile". + Kind string `json:"kind,omitempty"` + // LastModifiedInfo: Output only. The last modified timestamp of the dynamic + // profile. This is a read-only field. + LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"` + // Name: Required. Identifier. Name of this dynamic profile. This is a required + // field and must be less than 256 characters long. + Name string `json:"name,omitempty"` + // Status: Optional. Status of this dynamic profile. + // + // Possible values: + // "STATUS_UNKNOWN" - The dynamic profile status is unknown. This value is + // unused. + // "ACTIVE" - The dynamic profile is active. + // "INACTIVE" - The dynamic profile is inactive. + // "DELETED" - The dynamic profile is deleted. + Status string `json:"status,omitempty"` + // StudioAdvertiserId: Required. Advertiser ID of this dynamic profile. This is + // a required field on insertion. + StudioAdvertiserId int64 `json:"studioAdvertiserId,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. "Active") 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. "Active") 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 DynamicProfile) MarshalJSON() ([]byte, error) { + type NoMethod DynamicProfile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DynamicProfileFeedSettings: Contains dynamic profile specific settings for +// an associated dynamic feed. +type DynamicProfileFeedSettings struct { + // DynamicFeedId: Optional. Dynamic feed ID associated with dynamic profile + // version. + DynamicFeedId int64 `json:"dynamicFeedId,omitempty,string"` + // DynamicRules: Optional. Dynamic rules for row selection for the given + // dynamic feed in the given dynamic profile. + DynamicRules *DynamicRules `json:"dynamicRules,omitempty"` + // Quantity: Optional. The number of this dynamic feed rows needed by the + // dynamic profile, default value is 1. Acceptable values are between 1 to 99, + // inclusive. + Quantity int64 `json:"quantity,omitempty"` + // ForceSendFields is a list of field names (e.g. "DynamicFeedId") 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. "DynamicFeedId") 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 DynamicProfileFeedSettings) MarshalJSON() ([]byte, error) { + type NoMethod DynamicProfileFeedSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DynamicProfileVersion: Contains dynamic profile version information. +type DynamicProfileVersion struct { + // DynamicProfileFeedSettings: Optional. Associated dynamic feeds and their + // settings (including dynamic rules) for this dynamic profile version. + DynamicProfileFeedSettings []*DynamicProfileFeedSettings `json:"dynamicProfileFeedSettings,omitempty"` + // VersionId: Output only. Version ID of this dynamic profile version. This is + // a read-only, auto-generated field. -1 for draft version, 0+ for published + // versions. + VersionId int64 `json:"versionId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "DynamicProfileFeedSettings") + // 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. "DynamicProfileFeedSettings") 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 DynamicProfileVersion) MarshalJSON() ([]byte, error) { + type NoMethod DynamicProfileVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DynamicRules: Contains dynamic rules information. +type DynamicRules struct { + // AutoTargetedFieldIds: Optional. List of field IDs in this element that + // should be auto-targeted. Applicable when rule type is AUTO. + AutoTargetedFieldIds []int64 `json:"autoTargetedFieldIds,omitempty"` + // CustomRules: Optional. The custom rules of the dynamic feed, only applicable + // when rule type is CUSTOM. + CustomRules []*CustomRule `json:"customRules,omitempty"` + // CustomValueFields: Optional. Mapping between field ID and custom key that + // are used to match for auto filtering. + CustomValueFields []*CustomValueField `json:"customValueFields,omitempty"` + // ProximityFilter: Optional. The proximity targeting rules of the dynamic + // feed, only applicable when rule type is PROXIMITY_TARGETING. + ProximityFilter *ProximityFilter `json:"proximityFilter,omitempty"` + // RemarketingValueAttributes: Optional. The link between an element field ID + // and a list of user attribute IDs. + RemarketingValueAttributes []*RemarketingValueAttribute `json:"remarketingValueAttributes,omitempty"` + // RotationType: Optional. The rotation type to select from eligible rows. + // Rotation type only apply when the filtering rule results in more than one + // eligible rows. + // + // Possible values: + // "ROTATION_TYPE_UNKNOWN" - The rotation type is unknown. This value is + // unused. + // "RANDOM" - The rotation type is random. It is the default value. + // "OPTIMIZED" - The rotation type is optimized. + // "WEIGHTED" - The rotation type is weighted. + RotationType string `json:"rotationType,omitempty"` + // RuleType: Optional. The type of the rule, the default value is OPEN. + // + // Possible values: + // "RULE_SET_TYPE_UNKNOWN" - The rule type is unknown. This value is unused. + // "OPEN" - The rule type is open, all feed rows are eligible for selection. + // This is the default value. + // "AUTO" - The rule type is auto, the feed rows are eligible for selection + // based on the automatic rules. + // "CUSTOM" - The rule type is custom, the feed rows are eligible for + // selection based on the custom rules. + // "PROXIMITY_TARGETING" - The rule type is proximity targeting, the feed + // rows are eligible for selection based on the proximity targeting rules. + RuleType string `json:"ruleType,omitempty"` + // WeightFieldId: Optional. The field ID for the feed that will be used for + // weighted rotation, only applicable when rotation type is WEIGHTED. + WeightFieldId int64 `json:"weightFieldId,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoTargetedFieldIds") 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. "AutoTargetedFieldIds") 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 DynamicRules) MarshalJSON() ([]byte, error) { + type NoMethod DynamicRules + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DynamicTargetingKey: Contains properties of a dynamic targeting key. Dynamic // targeting keys are unique, user-friendly labels, created at the advertiser // level in DCM, that can be assigned to ads, creatives, and placements and @@ -6060,6 +6505,65 @@ func (s DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Element: Contains the element of the dynamic feed. +type Element struct { + // ActiveFieldId: Optional. The field ID to specify the active field in the + // feed. + ActiveFieldId int64 `json:"activeFieldId,omitempty"` + // CreateInfo: Output only. The creation timestamp of the element. This is a + // read-only field. + CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"` + // DefaultFieldId: Optional. The field ID to specify the field that represents + // the default field in the feed. + DefaultFieldId int64 `json:"defaultFieldId,omitempty"` + // ElementName: Optional. The name of the element. It is defaulted to resource + // file name if not provided. + ElementName string `json:"elementName,omitempty"` + // EndTimestampFieldId: Optional. The field ID to specify the field that + // represents the end timestamp. Only applicable if you're planning to use + // scheduling in your dynamic creative. + EndTimestampFieldId int64 `json:"endTimestampFieldId,omitempty"` + // ExternalIdFieldId: Required. The field ID to specify the field used for + // uniquely identifying the feed row. This is a required field. + ExternalIdFieldId int64 `json:"externalIdFieldId,omitempty"` + // FeedFields: Required. The list of fields of the element. The field order and + // name should match the meta data in the content source source. + FeedFields []*FeedField `json:"feedFields,omitempty"` + // IsLocalTimestamp: Optional. Whether the start and end timestamp is local + // timestamp. The default value is false which means start and end timestamp is + // in UTC. + IsLocalTimestamp bool `json:"isLocalTimestamp,omitempty"` + // LastModifiedInfo: Output only. The last modified timestamp of the element. + // This is a read-only field. + LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"` + // ProximityTargetingFieldId: Optional. The field ID that specify field used + // for proximity targeting. + ProximityTargetingFieldId int64 `json:"proximityTargetingFieldId,omitempty"` + // ReportingLabelFieldId: Required. The field ID to specify the field used for + // dynamic reporting in Campaign Manager 360. + ReportingLabelFieldId int64 `json:"reportingLabelFieldId,omitempty"` + // StartTimestampFieldId: Optional. The field ID to specify the field that + // represents the start timestamp. Only applicable if you're planning to use + // scheduling in your dynamic creative. + StartTimestampFieldId int64 `json:"startTimestampFieldId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveFieldId") 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. "ActiveFieldId") 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 Element) MarshalJSON() ([]byte, error) { + type NoMethod Element + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // EncryptionInfo: A description of how user IDs are encrypted. type EncryptionInfo struct { // EncryptionEntityId: The encryption entity ID. This should match the @@ -6257,28 +6761,366 @@ func (s EventTagsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// File: Represents a File resource. A file contains the metadata for a report -// run. It shows the status of the run and holds the URLs to the generated -// report data if the run is finished and the status is "REPORT_AVAILABLE". -type File struct { - // DateRange: The date range for which the file has report data. The date range - // will always be the absolute date range for which the report is run. - DateRange *DateRange `json:"dateRange,omitempty"` - // Etag: Etag of this resource. - Etag string `json:"etag,omitempty"` - // FileName: The filename of the file. - FileName string `json:"fileName,omitempty"` - // Format: The output format of the report. Only available once the file is - // available. +// FeedField: Each field of the element. This is a required field. +type FeedField struct { + // DefaultValue: Optional. The default value of the field. + DefaultValue string `json:"defaultValue,omitempty"` + // Filterable: Optional. Whether the field is filterable. Could be set as true + // when the field type is any of the following and is not renderable: - STRING + // - BOOL - COUNTRY_CODE_ISO - CM360_SITE_ID - CM360_KEYWORD - + // CM360_CREATIVE_ID - CM360_PLACEMENT_ID - CM360_AD_ID - CM360_ADVERTISER_ID - + // CM360_CAMPAIGN_ID - CITY - REGION - POSTAL_CODE - METRO - CUSTOM_VALUE - + // REMARKETING_VALUE - GEO_CANONICAL - STRING_LIST - CREATIVE_DIMENSION - + // USERLIST_ID - CM360_DYNAMIC_TARGETING_KEY - DV360_LINE_ITEM_ID + Filterable bool `json:"filterable,omitempty"` + // Id: Required. The ID of the field. The ID is based on the column index + // starting from 0, and it should match the column index in the resource link. + Id int64 `json:"id,omitempty"` + // Name: Required. The name of the field. + Name string `json:"name,omitempty"` + // Renderable: Optional. Whether the field is able to display. Could be set as + // true when the field type is not in any of the following and the field is not + // filterable: - COUNTRY_CODE_ISO - CITY - REGION - POSTAL_CODE - METRO - + // GEO_CANONICAL - USERLIST_ID - CONTEXTUAL_KEYWORD - + // CM360_DYNAMIC_TARGETING_KEY - WEIGHT + Renderable bool `json:"renderable,omitempty"` + // Required: Optional. Whether the field is required and should not be empty in + // the feed. Could be set as true when the field type is any of the following: + // - GPA_SERVED_IMAGE_URL - GPA_SERVED_ASSET_URL - ASSET_LIBRARY_HANDLE - + // ASSET_LIBRARY_VIDEO_HANDLE - ASSET_LIBRARY_DIRECTORY_HANDLE + Required bool `json:"required,omitempty"` + // Type: Required. The type of the field. // // Possible values: - // "CSV" - // "EXCEL" - Format string `json:"format,omitempty"` - // Id: The unique ID of this report file. - Id int64 `json:"id,omitempty,string"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "dfareporting#file". + // "TYPE_UNKNOWN" - The type is unspecified. This is an unused value. + // "STRING" - The field type is text. + // "LONG" - The field type is whole number. + // "GPA_SERVED_IMAGE_URL" - The field type is image url + // "GPA_SERVED_ASSET_URL" - The field type is asset url. + // "COUNTRY_CODE_ISO" - The field type is the ISO 3166-2 alpha-2 codes. It is + // two-letter country codes defined in ISO 3166-1 published by the + // International Organization for Standardization. + // "FLOAT" - The field type is decimal. + // "CM360_KEYWORD" - The field type is custom CM360 ad tag parameter. + // "CM360_SITE_ID" - The field type is CM360 site ID. + // "BOOL" - The field type is boolean. + // "EXIT_URL" - The field type is exit url. + // "DATETIME" - The field type is datetime. + // "CM360_CREATIVE_ID" - The field type is CM360 creative ID. + // "CM360_PLACEMENT_ID" - The field type is CM360 placement ID. + // "CM360_AD_ID" - The field type is CM360 ad ID. + // "CM360_ADVERTISER_ID" - The field type is CM360 advertiser ID. + // "CM360_CAMPAIGN_ID" - The field type is CM360 campaign ID. + // "CITY" - The field type is cities. + // "REGION" - The field type is region. + // "POSTAL_CODE" - The field type is postal code. + // "METRO" - The field type is metro code. + // "CUSTOM_VALUE" - The field type is custom value. + // "REMARKETING_VALUE" - The field type is remarketing value. + // "GEO_CANONICAL" - The field type is accurate geographic type. + // "WEIGHT" - The field type is weight. + // "STRING_LIST" - The field type is a list of values. + // "CREATIVE_DIMENSION" - The field type is creative dimension. + // "USERLIST_ID" - The field type is CM/DV360 Audience ID. + // "ASSET_LIBRARY_DIRECTORY_HANDLE" - The field type is AssetLibrary + // directory path. + // "ASSET_LIBRARY_VIDEO_HANDLE" - The field type is AssetLibrary video file + // path. + // "ASSET_LIBRARY_HANDLE" - The field type is AssetLibrary path. + // "THIRD_PARTY_SERVED_URL" - The field type is third party served url. + // "CM360_DYNAMIC_TARGETING_KEY" - The field type is CM dynamic targeting + // key. + // "DV360_LINE_ITEM_ID" - The field type is DV360 line item ID. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DefaultValue") 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. "DefaultValue") 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 FeedField) MarshalJSON() ([]byte, error) { + type NoMethod FeedField + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// FeedIngestionStatus: Contains the ingestion status of the dynamic feed. Feed +// ingestion is an asynchronous process. If the feed create request is +// successful, feed ingestion will be processed in the background, including +// validation, assets retrieval, and saving the data from the resource link. +// The processing time is dependent on the data size in the resource link. This +// read-only status field contains the current stage of that processing and its +// ingestion state. +type FeedIngestionStatus struct { + // IngestionErrorRecords: Output only. The ingestion error records of the feed. + IngestionErrorRecords []*IngestionErrorRecord `json:"ingestionErrorRecords,omitempty"` + // IngestionStatus: Output only. The ingestion status of the feed. + IngestionStatus *IngestionStatus `json:"ingestionStatus,omitempty"` + // State: Output only. The processing state of the feed. + // + // Possible values: + // "FEED_PROCESSING_STATE_UNKNOWN" - The feed processing state is unknown. + // "CANCELLED" - The feed processing state is cancelled. + // "INGESTING_QUEUED" - The feed processing state is ingesting queued. + // "INGESTING" - The feed processing state is ingesting. + // "INGESTED_SUCCESS" - The feed processing state is ingested successfully. + // "INGESTED_FAILURE" - The feed processing state is ingested with failure. + // "REQUEST_TO_PUBLISH" - The feed processing state is request to publish. + // "PUBLISHING" - The feed processing state is publishing. + // "PUBLISHED_SUCCESS" - The feed processing state is published successfully. + // "PUBLISHED_FAILURE" - The feed processing state is published with failure. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "IngestionErrorRecords") 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. "IngestionErrorRecords") 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 FeedIngestionStatus) MarshalJSON() ([]byte, error) { + type NoMethod FeedIngestionStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// FeedSchedule: Contains the schedule of the dynamic feed. +type FeedSchedule struct { + // RepeatValue: Optional. The number of times the feed retransforms within one + // day. This is a required field if the schedule is enabled. Acceptable values + // are between 1 to 6, inclusive. + RepeatValue int64 `json:"repeatValue,omitempty,string"` + // ScheduleEnabled: Optional. Whether the schedule is enabled. + ScheduleEnabled bool `json:"scheduleEnabled,omitempty"` + // StartHour: Optional. The hour of the day to start the feed. It is applicable + // if the repeat value is equal to 1. Default value is 0. + StartHour string `json:"startHour,omitempty"` + // StartMinute: Optional. The minute of the hour to start the feed. It is + // applicable if the repeat value is equal to 1. Default value is 0. + StartMinute string `json:"startMinute,omitempty"` + // TimeZone: Optional. The time zone to schedule the feed. It is applicable if + // the repeat value is equal to 1. Default value is "America/Los_Angeles". + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "RepeatValue") 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. "RepeatValue") 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 FeedSchedule) MarshalJSON() ([]byte, error) { + type NoMethod FeedSchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// FieldError: Contains the field error of the dynamic feed. +type FieldError struct { + // FieldId: Output only. The ID of the field. + FieldId int64 `json:"fieldId,omitempty"` + // FieldName: Output only. The name of the field. + FieldName string `json:"fieldName,omitempty"` + // FieldValues: Output only. The list of values of the field. + FieldValues []string `json:"fieldValues,omitempty"` + // IngestionError: Output only. The ingestion error of the field. + // + // Possible values: + // "UNKNOWN_PARSING_ERROR" - The ingestion error is unknown. + // "MISSING_ID" - The ingestion error when the ID value is missing. + // "MISSING_REPORTING_LABEL" - The ingestion error when the element value + // name used for reporting is missing. + // "EMPTY_VALUE" - The ingestion error when a required value is empty + // "ASSET_DOWNLOAD_ERROR" - The ingestion error when asset retrieval fails + // for a particular image or asset. + // "ID_TOO_LONG" - The ingestion error when the ID value exceeds the string + // length limit. + // "DUPLICATE_ID" - The ingestion error when the ID value is duplicate. + // "PARSING_ERROR" - The ingestion error when parsing the field fails. + // "COUNTRY_PARSING_ERROR" - The ingestion error when parsing the country + // code fails. + // "LONG_PARSING_ERROR" - The ingestion error when parsing the long value + // fails. + // "BOOL_PARSING_ERROR" - The ingestion error when parsing the boolean value + // fails. + // "EXPANDED_URL_PARSING_ERROR" - The ingestion error when parsing the + // expanded url fails. + // "FLOAT_PARSING_ERROR" - The ingestion error when parsing the float value + // fails. + // "DATETIME_PARSING_ERROR" - The ingestion error when parsing the datetime + // value fails. + // "INVALID_PREFERENCE_VALUE" - The ingestion error when the preference value + // is not a positive float. + // "GEO_NOT_FOUND_ERROR" - The ingestion error when a geo location is not + // found. + // "GEO_PARSING_ERROR" - The ingestion error when parsing the geo field + // fails. + // "GEO_PROXIMITY_TARGETING_MULTIPLE_LOCATION_ERROR" - The ingestion error + // when a feed row has multiple geotargets with proximity targeting enabled. + // "POSTAL_CODE_PARSING_ERROR" - The ingestion error when parsing the postal + // code value fails. + // "METRO_CODE_PARSING_ERROR" - The ingestion error when parsing the metro + // code value fails. + // "DATETIME_WITHOUT_TIMEZONE_PARSING_ERROR" - The ingestion error when + // parsing the datetime value fails. + // "WEIGHT_PARSING_ERROR" - The ingestion error when parsing the weight value + // fails. + // "CREATIVE_DIMENSION_PARSING_ERROR" - The ingestion error when parsing the + // creative dimension value fails. + // "MULTIVALUE_ID" - The ingestion error when a STRING_LIST type ID has + // multiple values. + // "ENDTIME_BEFORE_STARTTIME" - The ingestion error when the end time is + // before the start time. + // "INVALID_ASSET_LIBRARY_HANDLE" - The ingestion error when the asset + // library handle is invalid. + // "INVALID_ASSET_LIBRARY_VIDEO_HANDLE" - The ingestion error when the asset + // library video handle is invalid. + // "INVALID_ASSET_LIBRARY_DIRECTORY_HANDLE" - The ingestion error when the + // asset library directory handle is invalid. + // "DYNAMIC_TARGETING_KEY_NOT_DEFINED_FOR_ADVERTISER" - The ingestion error + // when a targeting key used but not defined for the CM360 Advertiser. + // "USERLIST_ID_NOT_ACCESSIBLE_FOR_ADVERTISER" - The ingestion error when the + // userlist ID is not accessible for the CM360 Advertiser. + // "ENDTIME_PASSED" - The ingestion error when the end time is passed. + // "ENDTIME_TOO_SOON" - The ingestion error when the end time is in the near + // future (i.e., <7 days). + // "TEXT_ASSET_REFERENCE" - The ingestion error when a text field specifies a + // reference to an asset. + // "IMAGE_ASSET_SCS_REFERENCE" - The ingestion error when Image field + // specifies a reference to an asset hosted on SCS (s0.2mdn.net/s0qa.2mdn.net). + // "AIRPORT_GEO_TARGET" - The ingestion error when a geo target is an + // airport. + // "CANONICAL_NAME_QUERY_MISMATCH" - The ingestion error when the geo + // target's canonical name does not match the query string used to obtain it. + // "NO_DEFAULT_ROW" - The ingestion error or warning when the default row is + // not set. + // "NO_ACTIVE_DEFAULT_ROW" - The ingestion error or warning when the default + // row is not active. + // "NO_DEFAULT_ROW_IN_DATE_RANGE" - The ingestion error or warning when the + // default row is not in the date range. + // "NO_ACTIVE_DEFAULT_ROW_IN_DATE_RANGE" - The ingestion error or warning + // when the default row is not in the date range. + // "PAYLOAD_LIMIT_EXCEEDED" - The ingestion error when when the payload of + // the record is above a threshold. + // "SSL_NOT_COMPLIANT" - The ingestion error or warning when the field is not + // SSL compliant. + IngestionError string `json:"ingestionError,omitempty"` + // IsError: Output only. Incidcates whether the field has error or warning. + IsError bool `json:"isError,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldId") 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. "FieldId") 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 FieldError) MarshalJSON() ([]byte, error) { + type NoMethod FieldError + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// FieldFilter: Contains field filter information. +type FieldFilter struct { + // BoolValue: Optional. The boolean values, only applicable when rhs_value_type + // is BOOL. + BoolValue bool `json:"boolValue,omitempty"` + // DependentFieldValue: Optional. The dependent values, only applicable when + // rhs_value_type is DEPENDENT. + DependentFieldValue *DependentFieldValue `json:"dependentFieldValue,omitempty"` + // FieldId: Optional. The field ID on the left hand side of the expression. + FieldId int64 `json:"fieldId,omitempty"` + // MatchType: Optional. Left hand side of the expression match type. + // + // Possible values: + // "LHS_MATCH_TYPE_UNKNOWN" - The left hand side of the expression is + // unknown. This value is unused. + // "EQUALS_OR_UNRESTRICTED" - The left hand side of the expression is equals + // or unrestricted. It is the default value. + // "EQUALS" - The left hand side of the expression is equals. + // "UNRESTRICTED" - The left hand side of the expression is unrestricted. + // Unrestricted is used to target fields with no restrictions. For example, + // country targeting fields hold a list of countries. If the list is empty, we + // consider the element value to have no restrictions. + // "NOT_EQUALS" - Left hand side of the expression is not equals. Not equals + // specifies which fields should not be targeted. + MatchType string `json:"matchType,omitempty"` + // RequestValue: Optional. The request value, only applicable when + // rhs_value_type is REQUEST. + RequestValue *RequestValue `json:"requestValue,omitempty"` + // StringValue: Optional. The string value, only applicable when rhs_value_type + // is STRING. + StringValue string `json:"stringValue,omitempty"` + // ValueType: Optional. Right hand side of the expression. + // + // Possible values: + // "RHS_VALUE_TYPE_UNKNOWN" - The right hand side of the expression is + // unknown. This value is unused. + // "STRING" - The right hand side of the expression is a string. + // "REQUEST" - The right hand side of the expression is a request value. + // "BOOL" - The right hand side of the expression is a boolean. + // "DEPENDENT" - The right hand side of the expression is a dependent field + // value. + ValueType string `json:"valueType,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoolValue") 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. "BoolValue") 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 FieldFilter) MarshalJSON() ([]byte, error) { + type NoMethod FieldFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// File: Represents a File resource. A file contains the metadata for a report +// run. It shows the status of the run and holds the URLs to the generated +// report data if the run is finished and the status is "REPORT_AVAILABLE". +type File struct { + // DateRange: The date range for which the file has report data. The date range + // will always be the absolute date range for which the report is run. + DateRange *DateRange `json:"dateRange,omitempty"` + // Etag: Etag of this resource. + Etag string `json:"etag,omitempty"` + // FileName: The filename of the file. + FileName string `json:"fileName,omitempty"` + // Format: The output format of the report. Only available once the file is + // available. + // + // Possible values: + // "CSV" + // "EXCEL" + Format string `json:"format,omitempty"` + // Id: The unique ID of this report file. + Id int64 `json:"id,omitempty,string"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "dfareporting#file". Kind string `json:"kind,omitempty"` // LastModifiedTime: The timestamp in milliseconds since epoch when this file // was last modified. @@ -7137,6 +7979,61 @@ func (s GeoTargeting) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// IngestionErrorRecord: Contains the ingestion error record of the dynamic +// feed. limited to 100 records. +type IngestionErrorRecord struct { + // Errors: Output only. The list of field errors of the ingestion error record. + Errors []*FieldError `json:"errors,omitempty"` + // RecordId: Output only. The record ID of the ingestion error record. + RecordId string `json:"recordId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 IngestionErrorRecord) MarshalJSON() ([]byte, error) { + type NoMethod IngestionErrorRecord + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// IngestionStatus: Contains the ingestion status of the dynamic feed. +type IngestionStatus struct { + // NumActiveRows: Output only. The number of active rows in the feed. + NumActiveRows int64 `json:"numActiveRows,omitempty,string"` + // NumRowsProcessed: Output only. The number of rows processed in the feed. + NumRowsProcessed int64 `json:"numRowsProcessed,omitempty,string"` + // NumRowsTotal: Output only. The total number of rows in the feed. + NumRowsTotal int64 `json:"numRowsTotal,omitempty,string"` + // NumRowsWithErrors: Output only. The number of rows with errors in the feed. + NumRowsWithErrors int64 `json:"numRowsWithErrors,omitempty,string"` + // NumWarningsTotal: Output only. The total number of warnings in the feed. + NumWarningsTotal int64 `json:"numWarningsTotal,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "NumActiveRows") 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. "NumActiveRows") 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 IngestionStatus) MarshalJSON() ([]byte, error) { + type NoMethod IngestionStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // InventoryItem: Represents a buy from the Planning inventory store. type InventoryItem struct { // AccountId: Account ID of this inventory item. @@ -9572,6 +10469,48 @@ func (s ProjectsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ProximityFilter: Contains proximity filter information. +type ProximityFilter struct { + // FieldId: Optional. Field ID in the element. + FieldId int64 `json:"fieldId,omitempty"` + // RadiusBucketType: Optional. The radius bucket type of the proximity filter + // + // Possible values: + // "RADIUS_BUCKET_TYPE_UNKNOWN" - The radius bucket type is unknown. + // "SMALL" - The radius bucket type is small. + // "MEDIUM" - The radius bucket type is medium. + // "LARGE" - The radius bucket type is large. + // "MULTI_REGIONAL" - The radius bucket type is multi-regional. + // "NATIONAL" - The radius bucket type is national. + RadiusBucketType string `json:"radiusBucketType,omitempty"` + // RadiusUnitType: Optional. The units of the radius value + // + // Possible values: + // "RADIUS_UNIT_TYPE_UNKNOWN" - The units of the radius value are unknown. + // This value is unused. + // "KILOMETERS" - The units of the radius value are kilometers. + // "MILES" - The units of the radius value are miles. + RadiusUnitType string `json:"radiusUnitType,omitempty"` + // RadiusValue: Optional. Radius length in units defined by radius_units. + RadiusValue int64 `json:"radiusValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldId") 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. "FieldId") 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 ProximityFilter) MarshalJSON() ([]byte, error) { + type NoMethod ProximityFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ReachReportCompatibleFields: Represents fields that are compatible to be // selected for a report of type "REACH". type ReachReportCompatibleFields struct { @@ -9844,6 +10783,31 @@ func (s RemarketingListsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RemarketingValueAttribute: Contains remarketing value attribute information. +type RemarketingValueAttribute struct { + // FieldId: Optional. Field ID in the element. + FieldId int64 `json:"fieldId,omitempty"` + // UserAttributeIds: Optional. Remarketing user attribute IDs for auto + // filtering. + UserAttributeIds googleapi.Int64s `json:"userAttributeIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldId") 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. "FieldId") 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 RemarketingValueAttribute) MarshalJSON() ([]byte, error) { + type NoMethod RemarketingValueAttribute + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Report: Represents a Report resource. type Report struct { // AccountId: The account ID to which this report belongs. @@ -10458,6 +11422,36 @@ func (s ReportsConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RequestValue: Contains request value information. +type RequestValue struct { + // ExcludeFromUserAttributeIds: Optional. User attribute IDs in the request + // that should be excluded. Used only when the field type is REMARKETING_VALUE + // or USER_ATTRIBUTE_ID. + ExcludeFromUserAttributeIds googleapi.Int64s `json:"excludeFromUserAttributeIds,omitempty"` + // Key: Optional. Custom key in the request. Used only when the field type is + // CUSTOM_VALUE. + Key string `json:"key,omitempty"` + // UserAttributeIds: Optional. User attribute IDs in the request. Used only + // when the field type is REMARKETING_VALUE or USER_ATTRIBUTE_ID. + UserAttributeIds googleapi.Int64s `json:"userAttributeIds,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ExcludeFromUserAttributeIds") 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. "ExcludeFromUserAttributeIds") 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 RequestValue) MarshalJSON() ([]byte, error) { + type NoMethod RequestValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RichMediaExitOverride: Rich Media Exit Override. type RichMediaExitOverride struct { // ClickThroughUrl: Click-through URL of this rich media exit override. @@ -10516,6 +11510,29 @@ func (s Rule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RuleBlock: Contains a list of field filters that the given custom rule will +// apply. +type RuleBlock struct { + // FieldFilter: Optional. A list of non-auto field filters + FieldFilter []*FieldFilter `json:"fieldFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldFilter") 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. "FieldFilter") 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 RuleBlock) MarshalJSON() ([]byte, error) { + type NoMethod RuleBlock + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Site: Contains properties of a site. type Site struct { // AccountId: Account ID of this site. This is a read-only field that can be @@ -24370,6 +25387,512 @@ func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySit } } +type DynamicFeedsGetCall struct { + s *Service + dynamicFeedId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a dynamic feed by ID. +// +// - dynamicFeedId: Dynamic feed ID. +func (r *DynamicFeedsService) Get(dynamicFeedId int64) *DynamicFeedsGetCall { + c := &DynamicFeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dynamicFeedId = dynamicFeedId + 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 *DynamicFeedsGetCall) Fields(s ...googleapi.Field) *DynamicFeedsGetCall { + 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 *DynamicFeedsGetCall) IfNoneMatch(entityTag string) *DynamicFeedsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DynamicFeedsGetCall) Context(ctx context.Context) *DynamicFeedsGetCall { + 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 *DynamicFeedsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DynamicFeedsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "studio/dynamicFeeds/{+dynamicFeedId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "dynamicFeedId": strconv.FormatInt(c.dynamicFeedId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dfareporting.dynamicFeeds.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dfareporting.dynamicFeeds.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *DynamicFeed.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 *DynamicFeedsGetCall) Do(opts ...googleapi.CallOption) (*DynamicFeed, 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 := &DynamicFeed{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dfareporting.dynamicFeeds.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type DynamicFeedsInsertCall struct { + s *Service + dynamicfeedsinsertrequest *DynamicFeedsInsertRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Inserts a new dynamic feed. +func (r *DynamicFeedsService) Insert(dynamicfeedsinsertrequest *DynamicFeedsInsertRequest) *DynamicFeedsInsertCall { + c := &DynamicFeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dynamicfeedsinsertrequest = dynamicfeedsinsertrequest + 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 *DynamicFeedsInsertCall) Fields(s ...googleapi.Field) *DynamicFeedsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DynamicFeedsInsertCall) Context(ctx context.Context) *DynamicFeedsInsertCall { + 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 *DynamicFeedsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DynamicFeedsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dynamicfeedsinsertrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "studio/dynamicFeeds") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dfareporting.dynamicFeeds.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dfareporting.dynamicFeeds.insert" call. +// Any non-2xx status code is an error. Response headers are in either +// *DynamicFeed.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 *DynamicFeedsInsertCall) Do(opts ...googleapi.CallOption) (*DynamicFeed, 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 := &DynamicFeed{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dfareporting.dynamicFeeds.insert", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type DynamicProfilesGetCall struct { + s *Service + dynamicProfileId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a dynamic profile by ID. +// +// - dynamicProfileId: Dynamic profile ID. +func (r *DynamicProfilesService) Get(dynamicProfileId int64) *DynamicProfilesGetCall { + c := &DynamicProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dynamicProfileId = dynamicProfileId + 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 *DynamicProfilesGetCall) Fields(s ...googleapi.Field) *DynamicProfilesGetCall { + 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 *DynamicProfilesGetCall) IfNoneMatch(entityTag string) *DynamicProfilesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DynamicProfilesGetCall) Context(ctx context.Context) *DynamicProfilesGetCall { + 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 *DynamicProfilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DynamicProfilesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "studio/dynamicProfiles/{+dynamicProfileId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "dynamicProfileId": strconv.FormatInt(c.dynamicProfileId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dfareporting.dynamicProfiles.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dfareporting.dynamicProfiles.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *DynamicProfile.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 *DynamicProfilesGetCall) Do(opts ...googleapi.CallOption) (*DynamicProfile, 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 := &DynamicProfile{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dfareporting.dynamicProfiles.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type DynamicProfilesInsertCall struct { + s *Service + dynamicprofile *DynamicProfile + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Inserts a new dynamic profile. +func (r *DynamicProfilesService) Insert(dynamicprofile *DynamicProfile) *DynamicProfilesInsertCall { + c := &DynamicProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dynamicprofile = dynamicprofile + 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 *DynamicProfilesInsertCall) Fields(s ...googleapi.Field) *DynamicProfilesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DynamicProfilesInsertCall) Context(ctx context.Context) *DynamicProfilesInsertCall { + 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 *DynamicProfilesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DynamicProfilesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dynamicprofile) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "studio/dynamicProfiles") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dfareporting.dynamicProfiles.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dfareporting.dynamicProfiles.insert" call. +// Any non-2xx status code is an error. Response headers are in either +// *DynamicProfile.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 *DynamicProfilesInsertCall) Do(opts ...googleapi.CallOption) (*DynamicProfile, 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 := &DynamicProfile{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dfareporting.dynamicProfiles.insert", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type DynamicProfilesUpdateCall struct { + s *Service + dynamicprofile *DynamicProfile + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates an existing dynamic profile. +func (r *DynamicProfilesService) Update(dynamicprofile *DynamicProfile) *DynamicProfilesUpdateCall { + c := &DynamicProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dynamicprofile = dynamicprofile + 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 *DynamicProfilesUpdateCall) Fields(s ...googleapi.Field) *DynamicProfilesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DynamicProfilesUpdateCall) Context(ctx context.Context) *DynamicProfilesUpdateCall { + 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 *DynamicProfilesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DynamicProfilesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dynamicprofile) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "studio/dynamicProfiles") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dfareporting.dynamicProfiles.update", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dfareporting.dynamicProfiles.update" call. +// Any non-2xx status code is an error. Response headers are in either +// *DynamicProfile.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 *DynamicProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*DynamicProfile, 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 := &DynamicProfile{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dfareporting.dynamicProfiles.update", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type DynamicTargetingKeysDeleteCall struct { s *Service profileId int64 diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index 5a1188a55f..b62a4fda9e 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -571,18 +571,18 @@ "https://www.googleapis.com/auth/display-video-mediaplanning" ] }, - "patch": { - "description": "Updates an existing campaign. Returns the updated campaign if successful.", - "flatPath": "v2/advertisers/{advertisersId}/campaigns/{campaignsId}", - "httpMethod": "PATCH", - "id": "displayvideo.advertisers.campaigns.patch", + "listAssignedTargetingOptions": { + "description": "Lists assigned targeting options of a campaign across targeting types.", + "flatPath": "v2/advertisers/{advertisersId}/campaigns/{campaignsId}:listAssignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.campaigns.listAssignedTargetingOptions", "parameterOrder": [ "advertiserId", "campaignId" ], "parameters": { "advertiserId": { - "description": "Output only. The unique ID of the advertiser the campaign belongs to.", + "description": "Required. The ID of the advertiser the campaign belongs to.", "format": "int64", "location": "path", "pattern": "^[^/]+$", @@ -590,123 +590,7 @@ "type": "string" }, "campaignId": { - "description": "Output only. The unique ID of the campaign. Assigned by the system.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The mask to control which fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}", - "request": { - "$ref": "Campaign" - }, - "response": { - "$ref": "Campaign" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video", - "https://www.googleapis.com/auth/display-video-mediaplanning" - ] - } - } - }, - "channels": { - "methods": { - "create": { - "description": "Creates a new channel. Returns the newly created channel if successful.", - "flatPath": "v2/advertisers/{advertisersId}/channels", - "httpMethod": "POST", - "id": "displayvideo.advertisers.channels.create", - "parameterOrder": [ - "advertiserId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the created channel.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the created channel.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "v2/advertisers/{+advertiserId}/channels", - "request": { - "$ref": "Channel" - }, - "response": { - "$ref": "Channel" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "get": { - "description": "Gets a channel for a partner or advertiser.", - "flatPath": "v2/advertisers/{advertisersId}/channels/{channelsId}", - "httpMethod": "GET", - "id": "displayvideo.advertisers.channels.get", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the fetched channel.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the channel to fetch.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the fetched channel.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "v2/advertisers/{+advertiserId}/channels/{+channelId}", - "response": { - "$ref": "Channel" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "list": { - "description": "Lists channels for a partner or advertiser.", - "flatPath": "v2/advertisers/{advertisersId}/channels", - "httpMethod": "GET", - "id": "displayvideo.advertisers.channels.list", - "parameterOrder": [ - "advertiserId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the channels.", + "description": "Required. The ID of the campaign to list assigned targeting options for.", "format": "int64", "location": "path", "pattern": "^[^/]+$", @@ -714,72 +598,61 @@ "type": "string" }, "filter": { - "description": "Allows filtering by channel fields. Supported syntax: * Filter expressions for channel can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All channels for which the display name contains \"google\": `displayName : \"google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` resources of targeting type `TARGETING_TYPE_LANGUAGE` or `TARGETING_TYPE_GENDER`: `targetingType=\"TARGETING_TYPE_LANGUAGE\" OR targetingType=\"TARGETING_TYPE_GENDER\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", "location": "query", "type": "string" }, "orderBy": { - "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `channelId` The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `displayName desc`.", + "description": "Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingType desc`.", "location": "query", "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListChannels` method. If not specified, the first page of results will be returned.", - "location": "query", - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the channels.", - "format": "int64", + "description": "A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", "location": "query", "type": "string" } }, - "path": "v2/advertisers/{+advertiserId}/channels", + "path": "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}:listAssignedTargetingOptions", "response": { - "$ref": "ListChannelsResponse" + "$ref": "BulkListCampaignAssignedTargetingOptionsResponse" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, "patch": { - "description": "Updates a channel. Returns the updated channel if successful.", - "flatPath": "v2/advertisers/{advertisersId}/channels/{channelId}", + "description": "Updates an existing campaign. Returns the updated campaign if successful.", + "flatPath": "v2/advertisers/{advertisersId}/campaigns/{campaignsId}", "httpMethod": "PATCH", - "id": "displayvideo.advertisers.channels.patch", + "id": "displayvideo.advertisers.campaigns.patch", "parameterOrder": [ "advertiserId", - "channelId" + "campaignId" ], "parameters": { "advertiserId": { - "description": "The ID of the advertiser that owns the created channel.", + "description": "Output only. The unique ID of the advertiser the campaign belongs to.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" }, - "channelId": { - "description": "Output only. The unique ID of the channel. Assigned by the system.", + "campaignId": { + "description": "Output only. The unique ID of the campaign. Assigned by the system.", "format": "int64", "location": "path", + "pattern": "^[^/]+$", "required": true, "type": "string" }, - "partnerId": { - "description": "The ID of the partner that owns the created channel.", - "format": "int64", - "location": "query", - "type": "string" - }, "updateMask": { "description": "Required. The mask to control which fields to update.", "format": "google-fieldmask", @@ -787,377 +660,451 @@ "type": "string" } }, - "path": "v2/advertisers/{+advertiserId}/channels/{channelId}", + "path": "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}", "request": { - "$ref": "Channel" + "$ref": "Campaign" }, "response": { - "$ref": "Channel" + "$ref": "Campaign" }, "scopes": [ - "https://www.googleapis.com/auth/display-video" + "https://www.googleapis.com/auth/display-video", + "https://www.googleapis.com/auth/display-video-mediaplanning" ] } }, "resources": { - "sites": { - "methods": { - "bulkEdit": { - "description": "Bulk edits sites under a single channel. The operation will delete the sites provided in BulkEditSitesRequest.deleted_sites and then create the sites provided in BulkEditSitesRequest.created_sites.", - "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites:bulkEdit", - "httpMethod": "POST", - "id": "displayvideo.advertisers.channels.sites.bulkEdit", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel to which the sites belong.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit", - "request": { - "$ref": "BulkEditSitesRequest" - }, - "response": { - "$ref": "BulkEditSitesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "create": { - "description": "Creates a site in a channel.", - "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites", - "httpMethod": "POST", - "id": "displayvideo.advertisers.channels.sites.create", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel in which the site will be created.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the parent channel.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "v2/advertisers/{advertiserId}/channels/{+channelId}/sites", - "request": { - "$ref": "Site" - }, - "response": { - "$ref": "Site" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "delete": { - "description": "Deletes a site from a channel.", - "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites/{sitesId}", - "httpMethod": "DELETE", - "id": "displayvideo.advertisers.channels.sites.delete", - "parameterOrder": [ - "advertiserId", - "channelId", - "urlOrAppId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel to which the site belongs.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the parent channel.", - "format": "int64", - "location": "query", - "type": "string" - }, - "urlOrAppId": { - "description": "Required. The URL or app ID of the site to delete.", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "list": { - "description": "Lists sites in a channel.", - "flatPath": "v2/advertisers/{advertisersId}/channels/{channelsId}/sites", - "httpMethod": "GET", - "id": "displayvideo.advertisers.channels.sites.list", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel to which the requested sites belong.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "filter": { - "description": "Allows filtering by site fields. Supported syntax: * Filter expressions for site retrieval can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID contains \"google\": `urlOrAppId : \"google\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Field by which to sort the list. Acceptable values are: * `urlOrAppId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `urlOrAppId desc`.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListSites` method. If not specified, the first page of results will be returned.", - "location": "query", - "type": "string" + "targetingTypes": { + "resources": { + "assignedTargetingOptions": { + "methods": { + "get": { + "description": "Gets a single targeting option assigned to a campaign.", + "flatPath": "v2/advertisers/{advertisersId}/campaigns/{campaignsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get", + "parameterOrder": [ + "advertiserId", + "campaignId", + "targetingType", + "assignedTargetingOptionId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the campaign belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "assignedTargetingOptionId": { + "description": "Required. An identifier unique to the targeting type in this campaign that identifies the assigned targeting option being requested.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "campaignId": { + "description": "Required. The ID of the campaign the assigned targeting option belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + "response": { + "$ref": "AssignedTargetingOption" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] }, - "partnerId": { - "description": "The ID of the partner that owns the parent channel.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "v2/advertisers/{+advertiserId}/channels/{+channelId}/sites", - "response": { - "$ref": "ListSitesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "replace": { - "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", - "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", - "httpMethod": "POST", - "id": "displayvideo.advertisers.channels.sites.replace", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel whose sites will be replaced.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" + "list": { + "description": "Lists the targeting options assigned to a campaign for a specified targeting type.", + "flatPath": "v2/advertisers/{advertisersId}/campaigns/{campaignsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list", + "parameterOrder": [ + "advertiserId", + "campaignId", + "targetingType" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the campaign belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "campaignId": { + "description": "Required. The ID of the campaign to list assigned targeting options for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedTargetingOptionId` * `inheritance` Examples: * `AssignedTargetingOption` resources with ID 1 or 2 `assignedTargetingOptionId=\"1\" OR assignedTargetingOptionId=\"2\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER` `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `5000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions", + "response": { + "$ref": "ListCampaignAssignedTargetingOptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] } - }, - "path": "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:replace", - "request": { - "$ref": "ReplaceSitesRequest" - }, - "response": { - "$ref": "ReplaceSitesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] + } } } } } }, - "creatives": { + "channels": { "methods": { "create": { - "description": "Creates a new creative. Returns the newly created creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", - "flatPath": "v2/advertisers/{advertisersId}/creatives", + "description": "Creates a new channel. Returns the newly created channel if successful.", + "flatPath": "v2/advertisers/{advertisersId}/channels", "httpMethod": "POST", - "id": "displayvideo.advertisers.creatives.create", + "id": "displayvideo.advertisers.channels.create", "parameterOrder": [ "advertiserId" ], "parameters": { "advertiserId": { - "description": "Output only. The unique ID of the advertiser the creative belongs to.", + "description": "The ID of the advertiser that owns the created channel.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the created channel.", + "format": "int64", + "location": "query", + "type": "string" } }, - "path": "v2/advertisers/{+advertiserId}/creatives", + "path": "v2/advertisers/{+advertiserId}/channels", "request": { - "$ref": "Creative" + "$ref": "Channel" }, "response": { - "$ref": "Creative" + "$ref": "Channel" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, - "delete": { - "description": "Deletes a creative. Returns error code `NOT_FOUND` if the creative does not exist. The creative should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be deleted. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", - "flatPath": "v2/advertisers/{advertisersId}/creatives/{creativesId}", - "httpMethod": "DELETE", - "id": "displayvideo.advertisers.creatives.delete", + "get": { + "description": "Gets a channel for a partner or advertiser.", + "flatPath": "v2/advertisers/{advertisersId}/channels/{channelsId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.channels.get", "parameterOrder": [ "advertiserId", - "creativeId" + "channelId" ], "parameters": { "advertiserId": { - "description": "The ID of the advertiser this creative belongs to.", + "description": "The ID of the advertiser that owns the fetched channel.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" }, - "creativeId": { - "description": "The ID of the creative to be deleted.", + "channelId": { + "description": "Required. The ID of the channel to fetch.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the fetched channel.", + "format": "int64", + "location": "query", + "type": "string" } }, - "path": "v2/advertisers/{+advertiserId}/creatives/{+creativeId}", + "path": "v2/advertisers/{+advertiserId}/channels/{+channelId}", "response": { - "$ref": "Empty" + "$ref": "Channel" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, - "get": { - "description": "Gets a creative.", - "flatPath": "v2/advertisers/{advertisersId}/creatives/{creativesId}", + "list": { + "description": "Lists channels for a partner or advertiser.", + "flatPath": "v2/advertisers/{advertisersId}/channels", "httpMethod": "GET", - "id": "displayvideo.advertisers.creatives.get", + "id": "displayvideo.advertisers.channels.list", "parameterOrder": [ - "advertiserId", - "creativeId" + "advertiserId" ], "parameters": { "advertiserId": { - "description": "Required. The ID of the advertiser this creative belongs to.", + "description": "The ID of the advertiser that owns the channels.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" }, - "creativeId": { - "description": "Required. The ID of the creative to fetch.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2/advertisers/{+advertiserId}/creatives/{+creativeId}", - "response": { - "$ref": "Creative" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "list": { - "description": "Lists creatives in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, creatives with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", - "flatPath": "v2/advertisers/{advertisersId}/creatives", - "httpMethod": "GET", - "id": "displayvideo.advertisers.creatives.list", - "parameterOrder": [ - "advertiserId" - ], - "parameters": { - "advertiserId": { - "description": "Required. The ID of the advertiser to list creatives for.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "filter": { - "description": "Allows filtering by creative fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `lineItemIds` field must use the `HAS (:)` operator. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. * For `entityStatus`, `minDuration`, `maxDuration`, `updateTime`, and `dynamic` fields, there may be at most one restriction. Supported Fields: * `approvalStatus` * `creativeId` * `creativeType` * `dimensions` (input in the form of `{width}x{height}`) * `dynamic` * `entityStatus` * `exchangeReviewStatus` (input in the form of `{exchange}-{reviewStatus}`) * `lineItemIds` * `maxDuration` (input in the form of `{duration}s`. Only seconds are supported) * `minDuration` (input in the form of `{duration}s`. Only seconds are supported) * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative resource's field value reflects the last time that a creative has been updated, which includes updates made by the system (e.g. creative review updates). Examples: * All native creatives: `creativeType=\"CREATIVE_TYPE_NATIVE\"` * All active creatives with 300x400 or 50x100 dimensions: `entityStatus=\"ENTITY_STATUS_ACTIVE\" AND (dimensions=\"300x400\" OR dimensions=\"50x100\")` * All dynamic creatives that are approved by AdX or AppNexus, with a minimum duration of 5 seconds and 200ms: `dynamic=\"true\" AND minDuration=\"5.2s\" AND (exchangeReviewStatus=\"EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED\" OR exchangeReviewStatus=\"EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED\")` * All video creatives that are associated with line item ID 1 or 2: `creativeType=\"CREATIVE_TYPE_VIDEO\" AND (lineItemIds:1 OR lineItemIds:2)` * Find creatives by multiple creative IDs: `creativeId=1 OR creativeId=2` * All creatives with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", - "location": "query", + "filter": { + "description": "Allows filtering by channel fields. Supported syntax: * Filter expressions for channel can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All channels for which the display name contains \"google\": `displayName : \"google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", "type": "string" }, "orderBy": { - "description": "Field by which to sort the list. Acceptable values are: * `creativeId` (default) * `createTime` * `mediaDuration` * `dimensions` (sorts by width first, then by height) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `createTime desc`.", + "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `channelId` The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `displayName desc`.", "location": "query", "type": "string" }, @@ -1168,45 +1115,56 @@ "type": "integer" }, "pageToken": { - "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCreatives` method. If not specified, the first page of results will be returned.", + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListChannels` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the channels.", + "format": "int64", "location": "query", "type": "string" } }, - "path": "v2/advertisers/{+advertiserId}/creatives", + "path": "v2/advertisers/{+advertiserId}/channels", "response": { - "$ref": "ListCreativesResponse" + "$ref": "ListChannelsResponse" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, "patch": { - "description": "Updates an existing creative. Returns the updated creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", - "flatPath": "v2/advertisers/{advertisersId}/creatives/{creativesId}", + "description": "Updates a channel. Returns the updated channel if successful.", + "flatPath": "v2/advertisers/{advertisersId}/channels/{channelId}", "httpMethod": "PATCH", - "id": "displayvideo.advertisers.creatives.patch", + "id": "displayvideo.advertisers.channels.patch", "parameterOrder": [ "advertiserId", - "creativeId" + "channelId" ], "parameters": { "advertiserId": { - "description": "Output only. The unique ID of the advertiser the creative belongs to.", + "description": "The ID of the advertiser that owns the created channel.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" }, - "creativeId": { - "description": "Output only. The unique ID of the creative. Assigned by the system.", + "channelId": { + "description": "Output only. The unique ID of the channel. Assigned by the system.", "format": "int64", "location": "path", - "pattern": "^[^/]+$", "required": true, "type": "string" }, + "partnerId": { + "description": "The ID of the partner that owns the created channel.", + "format": "int64", + "location": "query", + "type": "string" + }, "updateMask": { "description": "Required. The mask to control which fields to update.", "format": "google-fieldmask", @@ -1214,210 +1172,1323 @@ "type": "string" } }, - "path": "v2/advertisers/{+advertiserId}/creatives/{+creativeId}", + "path": "v2/advertisers/{+advertiserId}/channels/{channelId}", "request": { - "$ref": "Creative" + "$ref": "Channel" }, "response": { - "$ref": "Creative" + "$ref": "Channel" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] } - } - }, - "insertionOrders": { - "methods": { - "create": { - "description": "Creates a new insertion order. Returns the newly created insertion order if successful.", - "flatPath": "v2/advertisers/{advertisersId}/insertionOrders", - "httpMethod": "POST", - "id": "displayvideo.advertisers.insertionOrders.create", - "parameterOrder": [ - "advertiserId" - ], - "parameters": { - "advertiserId": { - "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2/advertisers/{+advertiserId}/insertionOrders", - "request": { - "$ref": "InsertionOrder" - }, - "response": { - "$ref": "InsertionOrder" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "delete": { - "description": "Deletes an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist. The insertion order should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", - "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", - "httpMethod": "DELETE", - "id": "displayvideo.advertisers.insertionOrders.delete", - "parameterOrder": [ - "advertiserId", - "insertionOrderId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser this insertion order belongs to.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" + }, + "resources": { + "sites": { + "methods": { + "bulkEdit": { + "description": "Bulk edits sites under a single channel. The operation will delete the sites provided in BulkEditSitesRequest.deleted_sites and then create the sites provided in BulkEditSitesRequest.created_sites.", + "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites:bulkEdit", + "httpMethod": "POST", + "id": "displayvideo.advertisers.channels.sites.bulkEdit", + "parameterOrder": [ + "advertiserId", + "channelId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel to which the sites belong.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit", + "request": { + "$ref": "BulkEditSitesRequest" + }, + "response": { + "$ref": "BulkEditSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] }, - "insertionOrderId": { - "description": "The ID of the insertion order to delete.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "get": { - "description": "Gets an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist.", - "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", - "httpMethod": "GET", - "id": "displayvideo.advertisers.insertionOrders.get", - "parameterOrder": [ - "advertiserId", - "insertionOrderId" - ], - "parameters": { - "advertiserId": { - "description": "Required. The ID of the advertiser this insertion order belongs to.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" + "create": { + "description": "Creates a site in a channel.", + "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites", + "httpMethod": "POST", + "id": "displayvideo.advertisers.channels.sites.create", + "parameterOrder": [ + "advertiserId", + "channelId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel in which the site will be created.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the parent channel.", + "format": "int64", + "location": "query", + "type": "string" + } + }, + "path": "v2/advertisers/{advertiserId}/channels/{+channelId}/sites", + "request": { + "$ref": "Site" + }, + "response": { + "$ref": "Site" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] }, - "insertionOrderId": { - "description": "Required. The ID of the insertion order to fetch.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", - "response": { - "$ref": "InsertionOrder" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "list": { - "description": "Lists insertion orders in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, insertion orders with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", - "flatPath": "v2/advertisers/{advertisersId}/insertionOrders", - "httpMethod": "GET", - "id": "displayvideo.advertisers.insertionOrders.list", + "delete": { + "description": "Deletes a site from a channel.", + "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites/{sitesId}", + "httpMethod": "DELETE", + "id": "displayvideo.advertisers.channels.sites.delete", + "parameterOrder": [ + "advertiserId", + "channelId", + "urlOrAppId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel to which the site belongs.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the parent channel.", + "format": "int64", + "location": "query", + "type": "string" + }, + "urlOrAppId": { + "description": "Required. The URL or app ID of the site to delete.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "list": { + "description": "Lists sites in a channel.", + "flatPath": "v2/advertisers/{advertisersId}/channels/{channelsId}/sites", + "httpMethod": "GET", + "id": "displayvideo.advertisers.channels.sites.list", + "parameterOrder": [ + "advertiserId", + "channelId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel to which the requested sites belong.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by site fields. Supported syntax: * Filter expressions for site retrieval can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID contains \"google\": `urlOrAppId : \"google\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `urlOrAppId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `urlOrAppId desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListSites` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the parent channel.", + "format": "int64", + "location": "query", + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/channels/{+channelId}/sites", + "response": { + "$ref": "ListSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "replace": { + "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", + "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", + "httpMethod": "POST", + "id": "displayvideo.advertisers.channels.sites.replace", + "parameterOrder": [ + "advertiserId", + "channelId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel whose sites will be replaced.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:replace", + "request": { + "$ref": "ReplaceSitesRequest" + }, + "response": { + "$ref": "ReplaceSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + } + } + } + } + }, + "creatives": { + "methods": { + "create": { + "description": "Creates a new creative. Returns the newly created creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", + "flatPath": "v2/advertisers/{advertisersId}/creatives", + "httpMethod": "POST", + "id": "displayvideo.advertisers.creatives.create", "parameterOrder": [ "advertiserId" ], "parameters": { "advertiserId": { - "description": "Required. The ID of the advertiser to list insertion orders for.", + "description": "Output only. The unique ID of the advertiser the creative belongs to.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" - }, - "filter": { - "description": "Allows filtering by insertion order fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All insertion orders under a campaign: `campaignId=\"1234\"` * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders under an advertiser: `(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR entityStatus=\"ENTITY_STATUS_PAUSED\")` * All insertion orders with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003c=\"2020-11-04T18:54:47Z\"` * All insertion orders with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Field by which to sort the list. Acceptable values are: * \"displayName\" (default) * \"entityStatus\" * \"updateTime\" The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", - "location": "query", + } + }, + "path": "v2/advertisers/{+advertiserId}/creatives", + "request": { + "$ref": "Creative" + }, + "response": { + "$ref": "Creative" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "delete": { + "description": "Deletes a creative. Returns error code `NOT_FOUND` if the creative does not exist. The creative should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be deleted. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", + "flatPath": "v2/advertisers/{advertisersId}/creatives/{creativesId}", + "httpMethod": "DELETE", + "id": "displayvideo.advertisers.creatives.delete", + "parameterOrder": [ + "advertiserId", + "creativeId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser this creative belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, "type": "string" }, - "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInsertionOrders` method. If not specified, the first page of results will be returned.", - "location": "query", + "creativeId": { + "description": "The ID of the creative to be deleted.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, "type": "string" } }, - "path": "v2/advertisers/{+advertiserId}/insertionOrders", + "path": "v2/advertisers/{+advertiserId}/creatives/{+creativeId}", "response": { - "$ref": "ListInsertionOrdersResponse" + "$ref": "Empty" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, - "patch": { - "description": "Updates an existing insertion order. Returns the updated insertion order if successful.", - "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", - "httpMethod": "PATCH", - "id": "displayvideo.advertisers.insertionOrders.patch", + "get": { + "description": "Gets a creative.", + "flatPath": "v2/advertisers/{advertisersId}/creatives/{creativesId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.creatives.get", "parameterOrder": [ "advertiserId", - "insertionOrderId" + "creativeId" ], "parameters": { "advertiserId": { - "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", + "description": "Required. The ID of the advertiser this creative belongs to.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" }, - "insertionOrderId": { - "description": "Output only. The unique ID of the insertion order. Assigned by the system.", + "creativeId": { + "description": "Required. The ID of the creative to fetch.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" - }, - "updateMask": { - "description": "Required. The mask to control which fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" } - }, - "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", - "request": { - "$ref": "InsertionOrder" - }, - "response": { - "$ref": "InsertionOrder" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] + }, + "path": "v2/advertisers/{+advertiserId}/creatives/{+creativeId}", + "response": { + "$ref": "Creative" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "list": { + "description": "Lists creatives in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, creatives with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", + "flatPath": "v2/advertisers/{advertisersId}/creatives", + "httpMethod": "GET", + "id": "displayvideo.advertisers.creatives.list", + "parameterOrder": [ + "advertiserId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser to list creatives for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by creative fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `lineItemIds` field must use the `HAS (:)` operator. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. * For `entityStatus`, `minDuration`, `maxDuration`, `updateTime`, and `dynamic` fields, there may be at most one restriction. Supported Fields: * `approvalStatus` * `creativeId` * `creativeType` * `dimensions` (input in the form of `{width}x{height}`) * `dynamic` * `entityStatus` * `exchangeReviewStatus` (input in the form of `{exchange}-{reviewStatus}`) * `lineItemIds` * `maxDuration` (input in the form of `{duration}s`. Only seconds are supported) * `minDuration` (input in the form of `{duration}s`. Only seconds are supported) * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative resource's field value reflects the last time that a creative has been updated, which includes updates made by the system (e.g. creative review updates). Examples: * All native creatives: `creativeType=\"CREATIVE_TYPE_NATIVE\"` * All active creatives with 300x400 or 50x100 dimensions: `entityStatus=\"ENTITY_STATUS_ACTIVE\" AND (dimensions=\"300x400\" OR dimensions=\"50x100\")` * All dynamic creatives that are approved by AdX or AppNexus, with a minimum duration of 5 seconds and 200ms: `dynamic=\"true\" AND minDuration=\"5.2s\" AND (exchangeReviewStatus=\"EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED\" OR exchangeReviewStatus=\"EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED\")` * All video creatives that are associated with line item ID 1 or 2: `creativeType=\"CREATIVE_TYPE_VIDEO\" AND (lineItemIds:1 OR lineItemIds:2)` * Find creatives by multiple creative IDs: `creativeId=1 OR creativeId=2` * All creatives with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `creativeId` (default) * `createTime` * `mediaDuration` * `dimensions` (sorts by width first, then by height) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `createTime desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCreatives` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/creatives", + "response": { + "$ref": "ListCreativesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "patch": { + "description": "Updates an existing creative. Returns the updated creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", + "flatPath": "v2/advertisers/{advertisersId}/creatives/{creativesId}", + "httpMethod": "PATCH", + "id": "displayvideo.advertisers.creatives.patch", + "parameterOrder": [ + "advertiserId", + "creativeId" + ], + "parameters": { + "advertiserId": { + "description": "Output only. The unique ID of the advertiser the creative belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "creativeId": { + "description": "Output only. The unique ID of the creative. Assigned by the system.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/creatives/{+creativeId}", + "request": { + "$ref": "Creative" + }, + "response": { + "$ref": "Creative" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + } + } + }, + "insertionOrders": { + "methods": { + "create": { + "description": "Creates a new insertion order. Returns the newly created insertion order if successful.", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders", + "httpMethod": "POST", + "id": "displayvideo.advertisers.insertionOrders.create", + "parameterOrder": [ + "advertiserId" + ], + "parameters": { + "advertiserId": { + "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders", + "request": { + "$ref": "InsertionOrder" + }, + "response": { + "$ref": "InsertionOrder" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "delete": { + "description": "Deletes an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist. The insertion order should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", + "httpMethod": "DELETE", + "id": "displayvideo.advertisers.insertionOrders.delete", + "parameterOrder": [ + "advertiserId", + "insertionOrderId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser this insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "The ID of the insertion order to delete.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "get": { + "description": "Gets an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist.", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.get", + "parameterOrder": [ + "advertiserId", + "insertionOrderId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser this insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order to fetch.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", + "response": { + "$ref": "InsertionOrder" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "list": { + "description": "Lists insertion orders in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, insertion orders with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.list", + "parameterOrder": [ + "advertiserId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser to list insertion orders for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by insertion order fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All insertion orders under a campaign: `campaignId=\"1234\"` * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders under an advertiser: `(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR entityStatus=\"ENTITY_STATUS_PAUSED\")` * All insertion orders with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003c=\"2020-11-04T18:54:47Z\"` * All insertion orders with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * \"displayName\" (default) * \"entityStatus\" * \"updateTime\" The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInsertionOrders` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders", + "response": { + "$ref": "ListInsertionOrdersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "listAssignedTargetingOptions": { + "description": "Lists assigned targeting options of an insertion order across targeting types.", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}:listAssignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.listAssignedTargetingOptions", + "parameterOrder": [ + "advertiserId", + "insertionOrderId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` resources of targeting type `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` or `TARGETING_TYPE_CHANNEL`: `targetingType=\"TARGETING_TYPE_PROXIMITY_LOCATION_LIST\" OR targetingType=\"TARGETING_TYPE_CHANNEL\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order to list assigned targeting options for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingType desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListInsertionOrderAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}:listAssignedTargetingOptions", + "response": { + "$ref": "BulkListInsertionOrderAssignedTargetingOptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "patch": { + "description": "Updates an existing insertion order. Returns the updated insertion order if successful.", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", + "httpMethod": "PATCH", + "id": "displayvideo.advertisers.insertionOrders.patch", + "parameterOrder": [ + "advertiserId", + "insertionOrderId" + ], + "parameters": { + "advertiserId": { + "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Output only. The unique ID of the insertion order. Assigned by the system.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", + "request": { + "$ref": "InsertionOrder" + }, + "response": { + "$ref": "InsertionOrder" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + } + }, + "resources": { + "targetingTypes": { + "resources": { + "assignedTargetingOptions": { + "methods": { + "create": { + "description": "Assigns a targeting option to an insertion order. Returns the assigned targeting option if successful. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", + "httpMethod": "POST", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order the assigned targeting option will belong to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions", + "request": { + "$ref": "AssignedTargetingOption" + }, + "response": { + "$ref": "AssignedTargetingOption" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "delete": { + "description": "Deletes an assigned targeting option from an insertion order. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + "httpMethod": "DELETE", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType", + "assignedTargetingOptionId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "assignedTargetingOptionId": { + "description": "Required. The ID of the assigned targeting option to delete.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order the assigned targeting option belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "get": { + "description": "Gets a single targeting option assigned to an insertion order.", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType", + "assignedTargetingOptionId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "assignedTargetingOptionId": { + "description": "Required. An identifier unique to the targeting type in this insertion order that identifies the assigned targeting option being requested.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order the assigned targeting option belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + "response": { + "$ref": "AssignedTargetingOption" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "list": { + "description": "Lists the targeting options assigned to an insertion order.", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedTargetingOptionId` * `inheritance` Examples: * `AssignedTargetingOption` resources with ID 1 or 2: `assignedTargetingOptionId=\"1\" OR assignedTargetingOptionId=\"2\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order to list assigned targeting options for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `5000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInsertionOrderAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions", + "response": { + "$ref": "ListInsertionOrderAssignedTargetingOptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + } + } + } + } } } }, @@ -8010,7 +9081,7 @@ } } }, - "revision": "20250709", + "revision": "20250729", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -9744,6 +10815,40 @@ }, "type": "object" }, + "BulkListCampaignAssignedTargetingOptionsResponse": { + "id": "BulkListCampaignAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent BulkListCampaignAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, + "BulkListInsertionOrderAssignedTargetingOptionsResponse": { + "id": "BulkListInsertionOrderAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent BulkListInsertionOrderAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, "BulkUpdateLineItemsRequest": { "description": "Request message for LineItemService.BulkUpdateLineItems.", "id": "BulkUpdateLineItemsRequest", @@ -10965,7 +12070,7 @@ true, true, true, - false, + true, false, false, false, @@ -16021,6 +17126,24 @@ }, "type": "object" }, + "ListCampaignAssignedTargetingOptionsResponse": { + "description": "Response message for ListCampaignAssignedTargetingOptions.", + "id": "ListCampaignAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent ListCampaignAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, "ListCampaignsResponse": { "id": "ListCampaignsResponse", "properties": { @@ -16191,6 +17314,23 @@ }, "type": "object" }, + "ListInsertionOrderAssignedTargetingOptionsResponse": { + "id": "ListInsertionOrderAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent ListInsertionOrderAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, "ListInsertionOrdersResponse": { "id": "ListInsertionOrdersResponse", "properties": { @@ -18216,7 +19356,7 @@ true, true, true, - false, + true, false, false, false, @@ -18302,7 +19442,7 @@ true, true, true, - false, + true, false, false, false, diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index b6beb76cf6..2a02450e1d 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -271,11 +271,35 @@ type AdvertisersAssetsService struct { func NewAdvertisersCampaignsService(s *Service) *AdvertisersCampaignsService { rs := &AdvertisersCampaignsService{s: s} + rs.TargetingTypes = NewAdvertisersCampaignsTargetingTypesService(s) return rs } type AdvertisersCampaignsService struct { s *Service + + TargetingTypes *AdvertisersCampaignsTargetingTypesService +} + +func NewAdvertisersCampaignsTargetingTypesService(s *Service) *AdvertisersCampaignsTargetingTypesService { + rs := &AdvertisersCampaignsTargetingTypesService{s: s} + rs.AssignedTargetingOptions = NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s) + return rs +} + +type AdvertisersCampaignsTargetingTypesService struct { + s *Service + + AssignedTargetingOptions *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService +} + +func NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService { + rs := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService{s: s} + return rs +} + +type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService struct { + s *Service } func NewAdvertisersChannelsService(s *Service) *AdvertisersChannelsService { @@ -310,11 +334,35 @@ type AdvertisersCreativesService struct { func NewAdvertisersInsertionOrdersService(s *Service) *AdvertisersInsertionOrdersService { rs := &AdvertisersInsertionOrdersService{s: s} + rs.TargetingTypes = NewAdvertisersInsertionOrdersTargetingTypesService(s) return rs } type AdvertisersInsertionOrdersService struct { s *Service + + TargetingTypes *AdvertisersInsertionOrdersTargetingTypesService +} + +func NewAdvertisersInsertionOrdersTargetingTypesService(s *Service) *AdvertisersInsertionOrdersTargetingTypesService { + rs := &AdvertisersInsertionOrdersTargetingTypesService{s: s} + rs.AssignedTargetingOptions = NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s) + return rs +} + +type AdvertisersInsertionOrdersTargetingTypesService struct { + s *Service + + AssignedTargetingOptions *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService +} + +func NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService { + rs := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService{s: s} + return rs +} + +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService struct { + s *Service } func NewAdvertisersInvoicesService(s *Service) *AdvertisersInvoicesService { @@ -3044,6 +3092,68 @@ func (s BulkListAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BulkListCampaignAssignedTargetingOptionsResponse struct { + // AssignedTargetingOptions: The list of assigned targeting options. This list + // will be absent if empty. + AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` + // NextPageToken: A token identifying the next page of results. This value + // should be specified as the pageToken in a subsequent + // BulkListCampaignAssignedTargetingOptionsRequest to fetch the next page of + // results. This token will be absent if there are no more + // assigned_targeting_options to return. + 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. "AssignedTargetingOptions") + // 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. "AssignedTargetingOptions") 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 BulkListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod BulkListCampaignAssignedTargetingOptionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type BulkListInsertionOrderAssignedTargetingOptionsResponse struct { + // AssignedTargetingOptions: The list of assigned targeting options. This list + // will be absent if empty. + AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` + // NextPageToken: A token identifying the next page of results. This value + // should be specified as the pageToken in a subsequent + // BulkListInsertionOrderAssignedTargetingOptionsRequest to fetch the next page + // of results. This token will be absent if there are no more + // assigned_targeting_options to return. + 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. "AssignedTargetingOptions") + // 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. "AssignedTargetingOptions") 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 BulkListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod BulkListInsertionOrderAssignedTargetingOptionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BulkUpdateLineItemsRequest: Request message for // LineItemService.BulkUpdateLineItems. type BulkUpdateLineItemsRequest struct { @@ -9616,6 +9726,39 @@ func (s ListAssignedLocationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListCampaignAssignedTargetingOptionsResponse: Response message for +// ListCampaignAssignedTargetingOptions. +type ListCampaignAssignedTargetingOptionsResponse struct { + // AssignedTargetingOptions: The list of assigned targeting options. This list + // will be absent if empty. + AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` + // NextPageToken: A token identifying the next page of results. This value + // should be specified as the pageToken in a subsequent + // ListCampaignAssignedTargetingOptionsRequest to fetch the next page of + // results. This token will be absent if there are no more + // assigned_targeting_options to return. + 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. "AssignedTargetingOptions") + // 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. "AssignedTargetingOptions") 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 ListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListCampaignAssignedTargetingOptionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ListCampaignsResponse struct { // Campaigns: The list of campaigns. This list will be absent if empty. Campaigns []*Campaign `json:"campaigns,omitempty"` @@ -9905,6 +10048,37 @@ func (s ListGuaranteedOrdersResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type ListInsertionOrderAssignedTargetingOptionsResponse struct { + // AssignedTargetingOptions: The list of assigned targeting options. This list + // will be absent if empty. + AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` + // NextPageToken: A token identifying the next page of results. This value + // should be specified as the pageToken in a subsequent + // ListInsertionOrderAssignedTargetingOptionsRequest to fetch the next page of + // results. This token will be absent if there are no more + // assigned_targeting_options to return. + 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. "AssignedTargetingOptions") + // 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. "AssignedTargetingOptions") 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 ListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInsertionOrderAssignedTargetingOptionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ListInsertionOrdersResponse struct { // InsertionOrders: The list of insertion orders. This list will be absent if // empty. @@ -16424,72 +16598,116 @@ func (c *AdvertisersCampaignsListCall) Pages(ctx context.Context, f func(*ListCa } } -type AdvertisersCampaignsPatchCall struct { +type AdvertisersCampaignsListAssignedTargetingOptionsCall struct { s *Service advertiserId int64 campaignId int64 - campaign *Campaign urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Patch: Updates an existing campaign. Returns the updated campaign if -// successful. +// ListAssignedTargetingOptions: Lists assigned targeting options of a campaign +// across targeting types. // -// - advertiserId: Output only. The unique ID of the advertiser the campaign -// belongs to. -// - campaignId: Output only. The unique ID of the campaign. Assigned by the -// system. -func (r *AdvertisersCampaignsService) Patch(advertiserId int64, campaignId int64, campaign *Campaign) *AdvertisersCampaignsPatchCall { - c := &AdvertisersCampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the campaign belongs to. +// - campaignId: The ID of the campaign to list assigned targeting options for. +func (r *AdvertisersCampaignsService) ListAssignedTargetingOptions(advertiserId int64, campaignId int64) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c := &AdvertisersCampaignsListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.campaignId = campaignId - c.campaign = campaign return c } -// UpdateMask sets the optional parameter "updateMask": Required. The mask to -// control which fields to update. -func (c *AdvertisersCampaignsPatchCall) UpdateMask(updateMask string) *AdvertisersCampaignsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Filter sets the optional parameter "filter": Allows filtering by assigned +// targeting option fields. Supported syntax: * Filter expressions are made up +// of one or more restrictions. * Restrictions can be combined by the `OR` +// logical operator. * A restriction has the form of `{field} {operator} +// {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: +// * `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` +// resources of targeting type `TARGETING_TYPE_LANGUAGE` or +// `TARGETING_TYPE_GENDER`: `targetingType="TARGETING_TYPE_LANGUAGE" OR +// targetingType="TARGETING_TYPE_GENDER" * `AssignedTargetingOption` resources +// with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: +// `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER" The +// length of this field should be no more than 500 characters. Reference our +// filter `LIST` requests (/display-video/api/guides/how-tos/filters) guide for +// more information. +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * `targetingType` (default) The default sorting +// order is ascending. To specify descending order for a field, a suffix "desc" +// should be added to the field name. Example: `targetingType desc`. +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// size must be an integer between `1` and `5000`. If unspecified, the default +// is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is +// specified. +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token that lets the +// client fetch the next page of results. Typically, this is the value of +// next_page_token returned from the previous call to +// `BulkListCampaignAssignedTargetingOptions` method. If not specified, the +// first page of results will be returned. +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + 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 *AdvertisersCampaignsPatchCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsPatchCall { +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsListAssignedTargetingOptionsCall { 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 *AdvertisersCampaignsListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCampaignsPatchCall) Context(ctx context.Context) *AdvertisersCampaignsPatchCall { +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersCampaignsListAssignedTargetingOptionsCall { 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 *AdvertisersCampaignsPatchCall) Header() http.Header { +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.campaign) - if err != nil { - return nil, err +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}:listAssignedTargetingOptions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -16498,16 +16716,17 @@ func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, e "advertiserId": strconv.FormatInt(c.advertiserId, 10), "campaignId": strconv.FormatInt(c.campaignId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.listAssignedTargetingOptions", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.campaigns.patch" call. +// Do executes the "displayvideo.advertisers.campaigns.listAssignedTargetingOptions" call. // Any non-2xx status code is an error. Response headers are in either -// *Campaign.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 *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { +// *BulkListCampaignAssignedTargetingOptionsResponse.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 *AdvertisersCampaignsListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListCampaignAssignedTargetingOptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16526,7 +16745,7 @@ func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Campaign{ + ret := &BulkListCampaignAssignedTargetingOptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16537,88 +16756,115 @@ func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campa if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.listAssignedTargetingOptions", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsCreateCall struct { +// 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 *AdvertisersCampaignsListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListCampaignAssignedTargetingOptionsResponse) 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 AdvertisersCampaignsPatchCall struct { s *Service advertiserId int64 - channel *Channel + campaignId int64 + campaign *Campaign urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a new channel. Returns the newly created channel if +// Patch: Updates an existing campaign. Returns the updated campaign if // successful. // -// - advertiserId: The ID of the advertiser that owns the created channel. -func (r *AdvertisersChannelsService) Create(advertiserId int64, channel *Channel) *AdvertisersChannelsCreateCall { - c := &AdvertisersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: Output only. The unique ID of the advertiser the campaign +// belongs to. +// - campaignId: Output only. The unique ID of the campaign. Assigned by the +// system. +func (r *AdvertisersCampaignsService) Patch(advertiserId int64, campaignId int64, campaign *Campaign) *AdvertisersCampaignsPatchCall { + c := &AdvertisersCampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.channel = channel + c.campaignId = campaignId + c.campaign = campaign return c } -// PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the created channel. -func (c *AdvertisersChannelsCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsCreateCall { - c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) +// UpdateMask sets the optional parameter "updateMask": Required. The mask to +// control which fields to update. +func (c *AdvertisersCampaignsPatchCall) UpdateMask(updateMask string) *AdvertisersCampaignsPatchCall { + 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 *AdvertisersChannelsCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsCreateCall { +func (c *AdvertisersCampaignsPatchCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsCreateCall) Context(ctx context.Context) *AdvertisersChannelsCreateCall { +func (c *AdvertisersCampaignsPatchCall) Context(ctx context.Context) *AdvertisersCampaignsPatchCall { 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 *AdvertisersChannelsCreateCall) Header() http.Header { +func (c *AdvertisersCampaignsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.channel) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.campaign) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "campaignId": strconv.FormatInt(c.campaignId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.create" call. +// Do executes the "displayvideo.advertisers.campaigns.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Channel.ServerResponse.Header or (if a response was returned at all) in +// *Campaign.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 *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) { +func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16637,7 +16883,7 @@ func (c *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Chann if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Channel{ + ret := &Campaign{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16648,42 +16894,57 @@ func (c *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Chann if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsGetCall struct { - s *Service - advertiserId int64 - channelId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall struct { + s *Service + advertiserId int64 + campaignId int64 + targetingType string + assignedTargetingOptionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Gets a channel for a partner or advertiser. +// Get: Gets a single targeting option assigned to a campaign. // -// - advertiserId: The ID of the advertiser that owns the fetched channel. -// - channelId: The ID of the channel to fetch. -func (r *AdvertisersChannelsService) Get(advertiserId int64, channelId int64) *AdvertisersChannelsGetCall { - c := &AdvertisersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the campaign belongs to. +// - assignedTargetingOptionId: An identifier unique to the targeting type in +// this campaign that identifies the assigned targeting option being +// requested. +// - campaignId: The ID of the campaign the assigned targeting option belongs +// to. +// - targetingType: Identifies the type of this assigned targeting option. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * +// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * +// `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * +// `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * +// `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, campaignId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { + c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.channelId = channelId - return c -} - -// PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the fetched channel. -func (c *AdvertisersChannelsGetCall) PartnerId(partnerId int64) *AdvertisersChannelsGetCall { - c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) + c.campaignId = campaignId + c.targetingType = targetingType + c.assignedTargetingOptionId = assignedTargetingOptionId 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 *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersChannelsGetCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16691,34 +16952,34 @@ func (c *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersCh // 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 *AdvertisersChannelsGetCall) IfNoneMatch(entityTag string) *AdvertisersChannelsGetCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsGetCall) Context(ctx context.Context) *AdvertisersChannelsGetCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { 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 *AdvertisersChannelsGetCall) Header() http.Header { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels/{+channelId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -16726,19 +16987,22 @@ func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "channelId": strconv.FormatInt(c.channelId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "campaignId": strconv.FormatInt(c.campaignId, 10), + "targetingType": c.targetingType, + "assignedTargetingOptionId": c.assignedTargetingOptionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.get" call. +// Do executes the "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Channel.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 *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) { +// *AssignedTargetingOption.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 *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16757,7 +17021,7 @@ func (c *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Channel{ + ret := &AssignedTargetingOption{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16768,79 +17032,98 @@ func (c *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsListCall struct { - s *Service - advertiserId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall struct { + s *Service + advertiserId int64 + campaignId int64 + targetingType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Lists channels for a partner or advertiser. +// List: Lists the targeting options assigned to a campaign for a specified +// targeting type. // -// - advertiserId: The ID of the advertiser that owns the channels. -func (r *AdvertisersChannelsService) List(advertiserId int64) *AdvertisersChannelsListCall { - c := &AdvertisersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the campaign belongs to. +// - campaignId: The ID of the campaign to list assigned targeting options for. +// - targetingType: Identifies the type of assigned targeting options to list. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * +// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * +// `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * +// `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * +// `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, campaignId int64, targetingType string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { + c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId + c.campaignId = campaignId + c.targetingType = targetingType return c } -// Filter sets the optional parameter "filter": Allows filtering by channel -// fields. Supported syntax: * Filter expressions for channel can only contain -// at most one restriction. * A restriction has the form of `{field} {operator} -// {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * -// `displayName` Examples: * All channels for which the display name contains -// "google": `displayName : "google". The length of this field should be no +// Filter sets the optional parameter "filter": Allows filtering by assigned +// targeting option fields. Supported syntax: * Filter expressions are made up +// of one or more restrictions. * Restrictions can be combined by the `OR` +// logical operator. * A restriction has the form of `{field} {operator} +// {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: +// * `assignedTargetingOptionId` * `inheritance` Examples: * +// `AssignedTargetingOption` resources with ID 1 or 2 +// `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" * +// `AssignedTargetingOption` resources with inheritance status of +// `NOT_INHERITED` or `INHERITED_FROM_PARTNER` `inheritance="NOT_INHERITED" OR +// inheritance="INHERITED_FROM_PARTNER" The length of this field should be no // more than 500 characters. Reference our filter `LIST` requests // (/display-video/api/guides/how-tos/filters) guide for more information. -func (c *AdvertisersChannelsListCall) Filter(filter string) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Field by which to sort the -// list. Acceptable values are: * `displayName` (default) * `channelId` The +// list. Acceptable values are: * `assignedTargetingOptionId` (default) The // default sorting order is ascending. To specify descending order for a field, -// a suffix " desc" should be added to the field name. Example: `displayName -// desc`. -func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChannelsListCall { +// a suffix "desc" should be added to the field name. Example: +// `assignedTargetingOptionId desc`. +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `200`. If unspecified will default to `100`. Returns +// be between `1` and `5000`. If unspecified will default to `100`. Returns // error code `INVALID_ARGUMENT` if an invalid value is specified. -func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 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. Typically, this is the value of -// next_page_token returned from the previous call to `ListChannels` method. If -// not specified, the first page of results will be returned. -func (c *AdvertisersChannelsListCall) PageToken(pageToken string) *AdvertisersChannelsListCall { +// next_page_token returned from the previous call to +// `ListCampaignAssignedTargetingOptions` method. If not specified, the first +// page of results will be returned. +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the channels. -func (c *AdvertisersChannelsListCall) PartnerId(partnerId int64) *AdvertisersChannelsListCall { - c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) - 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 *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16848,34 +17131,34 @@ func (c *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersC // 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 *AdvertisersChannelsListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsListCall) Context(ctx context.Context) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 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 *AdvertisersChannelsListCall) Header() http.Header { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -16883,19 +17166,21 @@ func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "campaignId": strconv.FormatInt(c.campaignId, 10), + "targetingType": c.targetingType, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.list" call. +// Do executes the "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListChannelsResponse.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 *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) { +// *ListCampaignAssignedTargetingOptionsResponse.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 *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListCampaignAssignedTargetingOptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16914,7 +17199,7 @@ func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListCha if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListChannelsResponse{ + ret := &ListCampaignAssignedTargetingOptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16925,14 +17210,14 @@ func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListCha if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list", "response", internallog.HTTPResponse(res, b)) 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 *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListCampaignAssignedTargetingOptionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -16950,67 +17235,57 @@ func (c *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListCha } } -type AdvertisersChannelsPatchCall struct { +type AdvertisersChannelsCreateCall struct { s *Service advertiserId int64 - channelId int64 channel *Channel urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a channel. Returns the updated channel if successful. +// Create: Creates a new channel. Returns the newly created channel if +// successful. // -// - advertiserId: The ID of the advertiser that owns the created channel. -// - channelId: Output only. The unique ID of the channel. Assigned by the -// system. -func (r *AdvertisersChannelsService) Patch(advertiserId int64, channelId int64, channel *Channel) *AdvertisersChannelsPatchCall { - c := &AdvertisersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the created channel. +func (r *AdvertisersChannelsService) Create(advertiserId int64, channel *Channel) *AdvertisersChannelsCreateCall { + c := &AdvertisersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.channelId = channelId c.channel = channel return c } // PartnerId sets the optional parameter "partnerId": The ID of the partner // that owns the created channel. -func (c *AdvertisersChannelsPatchCall) PartnerId(partnerId int64) *AdvertisersChannelsPatchCall { +func (c *AdvertisersChannelsCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsCreateCall { c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) return c } -// UpdateMask sets the optional parameter "updateMask": Required. The mask to -// control which fields to update. -func (c *AdvertisersChannelsPatchCall) UpdateMask(updateMask string) *AdvertisersChannelsPatchCall { - 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 *AdvertisersChannelsPatchCall) Fields(s ...googleapi.Field) *AdvertisersChannelsPatchCall { +func (c *AdvertisersChannelsCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsPatchCall) Context(ctx context.Context) *AdvertisersChannelsPatchCall { +func (c *AdvertisersChannelsCreateCall) Context(ctx context.Context) *AdvertisersChannelsCreateCall { 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 *AdvertisersChannelsPatchCall) Header() http.Header { +func (c *AdvertisersChannelsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersChannelsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.channel) if err != nil { @@ -17018,27 +17293,26 @@ func (c *AdvertisersChannelsPatchCall) doRequest(alt string) (*http.Response, er } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels/{channelId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.patch" call. +// Do executes the "displayvideo.advertisers.channels.create" call. // Any non-2xx status code is an error. Response headers are in either // *Channel.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 *AdvertisersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { +func (c *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17068,68 +17342,79 @@ func (c *AdvertisersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channe if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsSitesBulkEditCall struct { - s *Service - advertiserId int64 - channelId int64 - bulkeditsitesrequest *BulkEditSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersChannelsGetCall struct { + s *Service + advertiserId int64 + channelId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// BulkEdit: Bulk edits sites under a single channel. The operation will delete -// the sites provided in BulkEditSitesRequest.deleted_sites and then create the -// sites provided in BulkEditSitesRequest.created_sites. +// Get: Gets a channel for a partner or advertiser. // -// - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel to which the sites belong. -func (r *AdvertisersChannelsSitesService) BulkEdit(advertiserId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *AdvertisersChannelsSitesBulkEditCall { - c := &AdvertisersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the fetched channel. +// - channelId: The ID of the channel to fetch. +func (r *AdvertisersChannelsService) Get(advertiserId int64, channelId int64) *AdvertisersChannelsGetCall { + c := &AdvertisersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.channelId = channelId - c.bulkeditsitesrequest = bulkeditsitesrequest + return c +} + +// PartnerId sets the optional parameter "partnerId": The ID of the partner +// that owns the fetched channel. +func (c *AdvertisersChannelsGetCall) PartnerId(partnerId int64) *AdvertisersChannelsGetCall { + c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 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 *AdvertisersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesBulkEditCall { +func (c *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersChannelsGetCall { 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 *AdvertisersChannelsGetCall) IfNoneMatch(entityTag string) *AdvertisersChannelsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesBulkEditCall) Context(ctx context.Context) *AdvertisersChannelsSitesBulkEditCall { +func (c *AdvertisersChannelsGetCall) Context(ctx context.Context) *AdvertisersChannelsGetCall { 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 *AdvertisersChannelsSitesBulkEditCall) Header() http.Header { +func (c *AdvertisersChannelsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkeditsitesrequest) - if err != nil { - return nil, err +func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels/{+channelId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -17138,17 +17423,16 @@ func (c *AdvertisersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Resp "advertiserId": strconv.FormatInt(c.advertiserId, 10), "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.bulkEdit", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.bulkEdit" call. +// Do executes the "displayvideo.advertisers.channels.get" call. // Any non-2xx status code is an error. Response headers are in either -// *BulkEditSitesResponse.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 *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) { +// *Channel.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 *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17167,7 +17451,7 @@ func (c *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BulkEditSitesResponse{ + ret := &Channel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17178,35 +17462,71 @@ func (c *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.bulkEdit", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsSitesCreateCall struct { +type AdvertisersChannelsListCall struct { s *Service advertiserId int64 - channelId int64 - site *Site urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Create: Creates a site in a channel. +// List: Lists channels for a partner or advertiser. // -// - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel in which the site will be created. -func (r *AdvertisersChannelsSitesService) Create(advertiserId int64, channelId int64, site *Site) *AdvertisersChannelsSitesCreateCall { - c := &AdvertisersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the channels. +func (r *AdvertisersChannelsService) List(advertiserId int64) *AdvertisersChannelsListCall { + c := &AdvertisersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.channelId = channelId - c.site = site + return c +} + +// Filter sets the optional parameter "filter": Allows filtering by channel +// fields. Supported syntax: * Filter expressions for channel can only contain +// at most one restriction. * A restriction has the form of `{field} {operator} +// {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * +// `displayName` Examples: * All channels for which the display name contains +// "google": `displayName : "google". The length of this field should be no +// more than 500 characters. Reference our filter `LIST` requests +// (/display-video/api/guides/how-tos/filters) guide for more information. +func (c *AdvertisersChannelsListCall) Filter(filter string) *AdvertisersChannelsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * `displayName` (default) * `channelId` The +// default sorting order is ascending. To specify descending order for a field, +// a suffix " desc" should be added to the field name. Example: `displayName +// desc`. +func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChannelsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Must +// be between `1` and `200`. If unspecified will default to `100`. Returns +// error code `INVALID_ARGUMENT` if an invalid value is specified. +func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall { + 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. Typically, this is the value of +// next_page_token returned from the previous call to `ListChannels` method. If +// not specified, the first page of results will be returned. +func (c *AdvertisersChannelsListCall) PageToken(pageToken string) *AdvertisersChannelsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the parent channel. -func (c *AdvertisersChannelsSitesCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesCreateCall { +// that owns the channels. +func (c *AdvertisersChannelsListCall) PartnerId(partnerId int64) *AdvertisersChannelsListCall { c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) return c } @@ -17214,55 +17534,62 @@ func (c *AdvertisersChannelsSitesCreateCall) PartnerId(partnerId int64) *Adverti // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AdvertisersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesCreateCall { +func (c *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsListCall { 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 *AdvertisersChannelsListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesCreateCall) Context(ctx context.Context) *AdvertisersChannelsSitesCreateCall { +func (c *AdvertisersChannelsListCall) Context(ctx context.Context) *AdvertisersChannelsListCall { 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 *AdvertisersChannelsSitesCreateCall) Header() http.Header { +func (c *AdvertisersChannelsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.site) - if err != nil { - return nil, err +func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.create" call. +// Do executes the "displayvideo.advertisers.channels.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Site.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 *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) { +// *ListChannelsResponse.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 *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17281,7 +17608,7 @@ func (c *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Site{ + ret := &ListChannelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17292,70 +17619,102 @@ func (c *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsSitesDeleteCall struct { +// 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 *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) 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 AdvertisersChannelsPatchCall struct { s *Service advertiserId int64 channelId int64 - urlOrAppId string + channel *Channel urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a site from a channel. +// Patch: Updates a channel. Returns the updated channel if successful. // -// - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel to which the site belongs. -// - urlOrAppId: The URL or app ID of the site to delete. -func (r *AdvertisersChannelsSitesService) Delete(advertiserId int64, channelId int64, urlOrAppId string) *AdvertisersChannelsSitesDeleteCall { - c := &AdvertisersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the created channel. +// - channelId: Output only. The unique ID of the channel. Assigned by the +// system. +func (r *AdvertisersChannelsService) Patch(advertiserId int64, channelId int64, channel *Channel) *AdvertisersChannelsPatchCall { + c := &AdvertisersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.channelId = channelId - c.urlOrAppId = urlOrAppId + c.channel = channel return c } // PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the parent channel. -func (c *AdvertisersChannelsSitesDeleteCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesDeleteCall { +// that owns the created channel. +func (c *AdvertisersChannelsPatchCall) PartnerId(partnerId int64) *AdvertisersChannelsPatchCall { c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) return c } +// UpdateMask sets the optional parameter "updateMask": Required. The mask to +// control which fields to update. +func (c *AdvertisersChannelsPatchCall) UpdateMask(updateMask string) *AdvertisersChannelsPatchCall { + 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 *AdvertisersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesDeleteCall { +func (c *AdvertisersChannelsPatchCall) Fields(s ...googleapi.Field) *AdvertisersChannelsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesDeleteCall) Context(ctx context.Context) *AdvertisersChannelsSitesDeleteCall { +func (c *AdvertisersChannelsPatchCall) Context(ctx context.Context) *AdvertisersChannelsPatchCall { 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 *AdvertisersChannelsSitesDeleteCall) Header() http.Header { +func (c *AdvertisersChannelsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *AdvertisersChannelsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.channel) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels/{channelId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -17363,18 +17722,17 @@ func (c *AdvertisersChannelsSitesDeleteCall) doRequest(alt string) (*http.Respon googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), "channelId": strconv.FormatInt(c.channelId, 10), - "urlOrAppId": c.urlOrAppId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.delete" call. +// Do executes the "displayvideo.advertisers.channels.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in +// *Channel.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 *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *AdvertisersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17393,7 +17751,7 @@ func (c *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Channel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17404,119 +17762,68 @@ func (c *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsSitesListCall struct { - s *Service - advertiserId int64 - channelId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists sites in a channel. +type AdvertisersChannelsSitesBulkEditCall struct { + s *Service + advertiserId int64 + channelId int64 + bulkeditsitesrequest *BulkEditSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BulkEdit: Bulk edits sites under a single channel. The operation will delete +// the sites provided in BulkEditSitesRequest.deleted_sites and then create the +// sites provided in BulkEditSitesRequest.created_sites. // -// - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel to which the requested sites -// belong. -func (r *AdvertisersChannelsSitesService) List(advertiserId int64, channelId int64) *AdvertisersChannelsSitesListCall { - c := &AdvertisersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the parent channel. +// - channelId: The ID of the parent channel to which the sites belong. +func (r *AdvertisersChannelsSitesService) BulkEdit(advertiserId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *AdvertisersChannelsSitesBulkEditCall { + c := &AdvertisersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.channelId = channelId - return c -} - -// Filter sets the optional parameter "filter": Allows filtering by site -// fields. Supported syntax: * Filter expressions for site retrieval can only -// contain at most one restriction. * A restriction has the form of `{field} -// {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported -// fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID -// contains "google": `urlOrAppId : "google" The length of this field should -// be no more than 500 characters. Reference our filter `LIST` requests -// (/display-video/api/guides/how-tos/filters) guide for more information. -func (c *AdvertisersChannelsSitesListCall) Filter(filter string) *AdvertisersChannelsSitesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Field by which to sort the -// list. Acceptable values are: * `urlOrAppId` (default) The default sorting -// order is ascending. To specify descending order for a field, a suffix " -// desc" should be added to the field name. Example: `urlOrAppId desc`. -func (c *AdvertisersChannelsSitesListCall) OrderBy(orderBy string) *AdvertisersChannelsSitesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `10000`. If unspecified will default to `100`. Returns -// error code `INVALID_ARGUMENT` if an invalid value is specified. -func (c *AdvertisersChannelsSitesListCall) PageSize(pageSize int64) *AdvertisersChannelsSitesListCall { - 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. Typically, this is the value of -// next_page_token returned from the previous call to `ListSites` method. If -// not specified, the first page of results will be returned. -func (c *AdvertisersChannelsSitesListCall) PageToken(pageToken string) *AdvertisersChannelsSitesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the parent channel. -func (c *AdvertisersChannelsSitesListCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesListCall { - c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) + c.bulkeditsitesrequest = bulkeditsitesrequest 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 *AdvertisersChannelsSitesListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesListCall { +func (c *AdvertisersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesBulkEditCall { 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 *AdvertisersChannelsSitesListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsSitesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesListCall) Context(ctx context.Context) *AdvertisersChannelsSitesListCall { +func (c *AdvertisersChannelsSitesBulkEditCall) Context(ctx context.Context) *AdvertisersChannelsSitesBulkEditCall { 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 *AdvertisersChannelsSitesListCall) Header() http.Header { +func (c *AdvertisersChannelsSitesBulkEditCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesListCall) 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 *AdvertisersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkeditsitesrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels/{+channelId}/sites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -17525,17 +17832,17 @@ func (c *AdvertisersChannelsSitesListCall) doRequest(alt string) (*http.Response "advertiserId": strconv.FormatInt(c.advertiserId, 10), "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.bulkEdit", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.list" call. +// Do executes the "displayvideo.advertisers.channels.sites.bulkEdit" call. // Any non-2xx status code is an error. Response headers are in either -// *ListSitesResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *BulkEditSitesResponse.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 *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, error) { +func (c *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17554,7 +17861,7 @@ func (c *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*Li if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSitesResponse{ + ret := &BulkEditSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17565,90 +17872,71 @@ func (c *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*Li if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.bulkEdit", "response", internallog.HTTPResponse(res, b)) 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 *AdvertisersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) 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 AdvertisersChannelsSitesReplaceCall struct { - s *Service - advertiserId int64 - channelId int64 - replacesitesrequest *ReplaceSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersChannelsSitesCreateCall struct { + s *Service + advertiserId int64 + channelId int64 + site *Site + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Replace: Replaces all of the sites under a single channel. The operation -// will replace the sites under a channel with the sites provided in -// ReplaceSitesRequest.new_sites. **This method regularly experiences high -// latency.** We recommend increasing your default timeout -// (/display-video/api/guides/best-practices/timeouts#client_library_timeout) -// to avoid errors. +// Create: Creates a site in a channel. // // - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel whose sites will be replaced. -func (r *AdvertisersChannelsSitesService) Replace(advertiserId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *AdvertisersChannelsSitesReplaceCall { - c := &AdvertisersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - channelId: The ID of the parent channel in which the site will be created. +func (r *AdvertisersChannelsSitesService) Create(advertiserId int64, channelId int64, site *Site) *AdvertisersChannelsSitesCreateCall { + c := &AdvertisersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.channelId = channelId - c.replacesitesrequest = replacesitesrequest + c.site = site + return c +} + +// PartnerId sets the optional parameter "partnerId": The ID of the partner +// that owns the parent channel. +func (c *AdvertisersChannelsSitesCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesCreateCall { + c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 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 *AdvertisersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesReplaceCall { +func (c *AdvertisersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesReplaceCall) Context(ctx context.Context) *AdvertisersChannelsSitesReplaceCall { +func (c *AdvertisersChannelsSitesCreateCall) Context(ctx context.Context) *AdvertisersChannelsSitesCreateCall { 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 *AdvertisersChannelsSitesReplaceCall) Header() http.Header { +func (c *AdvertisersChannelsSitesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.replacesitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.site) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:replace") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17659,17 +17947,16 @@ func (c *AdvertisersChannelsSitesReplaceCall) doRequest(alt string) (*http.Respo "advertiserId": strconv.FormatInt(c.advertiserId, 10), "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.replace", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.replace" call. +// Do executes the "displayvideo.advertisers.channels.sites.create" call. // Any non-2xx status code is an error. Response headers are in either -// *ReplaceSitesResponse.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 *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, error) { +// *Site.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 *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17688,7 +17975,7 @@ func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReplaceSitesResponse{ + ret := &Site{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17699,84 +17986,89 @@ func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.replace", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersCreativesCreateCall struct { +type AdvertisersChannelsSitesDeleteCall struct { s *Service advertiserId int64 - creative *Creative + channelId int64 + urlOrAppId string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a new creative. Returns the newly created creative if -// successful. A "Standard" user role -// (//support.google.com/displayvideo/answer/2723011) or greater for the parent -// advertiser or partner is required to make this request. +// Delete: Deletes a site from a channel. // -// - advertiserId: Output only. The unique ID of the advertiser the creative -// belongs to. -func (r *AdvertisersCreativesService) Create(advertiserId int64, creative *Creative) *AdvertisersCreativesCreateCall { - c := &AdvertisersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the parent channel. +// - channelId: The ID of the parent channel to which the site belongs. +// - urlOrAppId: The URL or app ID of the site to delete. +func (r *AdvertisersChannelsSitesService) Delete(advertiserId int64, channelId int64, urlOrAppId string) *AdvertisersChannelsSitesDeleteCall { + c := &AdvertisersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.creative = creative + c.channelId = channelId + c.urlOrAppId = urlOrAppId + return c +} + +// PartnerId sets the optional parameter "partnerId": The ID of the partner +// that owns the parent channel. +func (c *AdvertisersChannelsSitesDeleteCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesDeleteCall { + c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 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 *AdvertisersCreativesCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreativesCreateCall { +func (c *AdvertisersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesCreateCall) Context(ctx context.Context) *AdvertisersCreativesCreateCall { +func (c *AdvertisersChannelsSitesDeleteCall) Context(ctx context.Context) *AdvertisersChannelsSitesDeleteCall { 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 *AdvertisersCreativesCreateCall) Header() http.Header { +func (c *AdvertisersChannelsSitesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) - if err != nil { - return nil, err - } +func (c *AdvertisersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "channelId": strconv.FormatInt(c.channelId, 10), + "urlOrAppId": c.urlOrAppId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.create" call. +// Do executes the "displayvideo.advertisers.channels.sites.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *Creative.ServerResponse.Header or (if a response was returned at all) in +// *Empty.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) { +func (c *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17795,7 +18087,7 @@ func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Crea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Creative{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17806,83 +18098,1241 @@ func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Crea if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersCreativesDeleteCall struct { +type AdvertisersChannelsSitesListCall struct { s *Service advertiserId int64 - creativeId int64 + channelId int64 urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Delete: Deletes a creative. Returns error code `NOT_FOUND` if the creative -// does not exist. The creative should be archived first, i.e. set -// entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be deleted. A -// "Standard" user role (//support.google.com/displayvideo/answer/2723011) or -// greater for the parent advertiser or partner is required to make this -// request. +// List: Lists sites in a channel. +// +// - advertiserId: The ID of the advertiser that owns the parent channel. +// - channelId: The ID of the parent channel to which the requested sites +// belong. +func (r *AdvertisersChannelsSitesService) List(advertiserId int64, channelId int64) *AdvertisersChannelsSitesListCall { + c := &AdvertisersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.channelId = channelId + return c +} + +// Filter sets the optional parameter "filter": Allows filtering by site +// fields. Supported syntax: * Filter expressions for site retrieval can only +// contain at most one restriction. * A restriction has the form of `{field} +// {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported +// fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID +// contains "google": `urlOrAppId : "google" The length of this field should +// be no more than 500 characters. Reference our filter `LIST` requests +// (/display-video/api/guides/how-tos/filters) guide for more information. +func (c *AdvertisersChannelsSitesListCall) Filter(filter string) *AdvertisersChannelsSitesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * `urlOrAppId` (default) The default sorting +// order is ascending. To specify descending order for a field, a suffix " +// desc" should be added to the field name. Example: `urlOrAppId desc`. +func (c *AdvertisersChannelsSitesListCall) OrderBy(orderBy string) *AdvertisersChannelsSitesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Must +// be between `1` and `10000`. If unspecified will default to `100`. Returns +// error code `INVALID_ARGUMENT` if an invalid value is specified. +func (c *AdvertisersChannelsSitesListCall) PageSize(pageSize int64) *AdvertisersChannelsSitesListCall { + 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. Typically, this is the value of +// next_page_token returned from the previous call to `ListSites` method. If +// not specified, the first page of results will be returned. +func (c *AdvertisersChannelsSitesListCall) PageToken(pageToken string) *AdvertisersChannelsSitesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// PartnerId sets the optional parameter "partnerId": The ID of the partner +// that owns the parent channel. +func (c *AdvertisersChannelsSitesListCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesListCall { + c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) + 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 *AdvertisersChannelsSitesListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesListCall { + 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 *AdvertisersChannelsSitesListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsSitesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersChannelsSitesListCall) Context(ctx context.Context) *AdvertisersChannelsSitesListCall { + 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 *AdvertisersChannelsSitesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersChannelsSitesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels/{+channelId}/sites") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "channelId": strconv.FormatInt(c.channelId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.channels.sites.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListSitesResponse.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 *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, 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 := &ListSitesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.list", "response", internallog.HTTPResponse(res, b)) + 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 *AdvertisersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) 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 AdvertisersChannelsSitesReplaceCall struct { + s *Service + advertiserId int64 + channelId int64 + replacesitesrequest *ReplaceSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Replace: Replaces all of the sites under a single channel. The operation +// will replace the sites under a channel with the sites provided in +// ReplaceSitesRequest.new_sites. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_timeout) +// to avoid errors. +// +// - advertiserId: The ID of the advertiser that owns the parent channel. +// - channelId: The ID of the parent channel whose sites will be replaced. +func (r *AdvertisersChannelsSitesService) Replace(advertiserId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *AdvertisersChannelsSitesReplaceCall { + c := &AdvertisersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.channelId = channelId + c.replacesitesrequest = replacesitesrequest + 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 *AdvertisersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesReplaceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersChannelsSitesReplaceCall) Context(ctx context.Context) *AdvertisersChannelsSitesReplaceCall { + 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 *AdvertisersChannelsSitesReplaceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.replacesitesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:replace") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "channelId": strconv.FormatInt(c.channelId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.replace", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.channels.sites.replace" call. +// Any non-2xx status code is an error. Response headers are in either +// *ReplaceSitesResponse.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 *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, 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 := &ReplaceSitesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.replace", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersCreativesCreateCall struct { + s *Service + advertiserId int64 + creative *Creative + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new creative. Returns the newly created creative if +// successful. A "Standard" user role +// (//support.google.com/displayvideo/answer/2723011) or greater for the parent +// advertiser or partner is required to make this request. +// +// - advertiserId: Output only. The unique ID of the advertiser the creative +// belongs to. +func (r *AdvertisersCreativesService) Create(advertiserId int64, creative *Creative) *AdvertisersCreativesCreateCall { + c := &AdvertisersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.creative = creative + 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 *AdvertisersCreativesCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreativesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesCreateCall) Context(ctx context.Context) *AdvertisersCreativesCreateCall { + 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 *AdvertisersCreativesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Creative.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 *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, 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 := &Creative{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersCreativesDeleteCall struct { + s *Service + advertiserId int64 + creativeId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a creative. Returns error code `NOT_FOUND` if the creative +// does not exist. The creative should be archived first, i.e. set +// entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be deleted. A +// "Standard" user role (//support.google.com/displayvideo/answer/2723011) or +// greater for the parent advertiser or partner is required to make this +// request. +// +// - advertiserId: The ID of the advertiser this creative belongs to. +// - creativeId: The ID of the creative to be deleted. +func (r *AdvertisersCreativesService) Delete(advertiserId int64, creativeId int64) *AdvertisersCreativesDeleteCall { + c := &AdvertisersCreativesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.creativeId = creativeId + 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 *AdvertisersCreativesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCreativesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesDeleteCall) Context(ctx context.Context) *AdvertisersCreativesDeleteCall { + 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 *AdvertisersCreativesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "creativeId": strconv.FormatInt(c.creativeId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersCreativesGetCall struct { + s *Service + advertiserId int64 + creativeId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a creative. +// +// - advertiserId: The ID of the advertiser this creative belongs to. +// - creativeId: The ID of the creative to fetch. +func (r *AdvertisersCreativesService) Get(advertiserId int64, creativeId int64) *AdvertisersCreativesGetCall { + c := &AdvertisersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.creativeId = creativeId + 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 *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersCreativesGetCall { + 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 *AdvertisersCreativesGetCall) IfNoneMatch(entityTag string) *AdvertisersCreativesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesGetCall) Context(ctx context.Context) *AdvertisersCreativesGetCall { + 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 *AdvertisersCreativesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "creativeId": strconv.FormatInt(c.creativeId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Creative.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 *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, 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 := &Creative{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersCreativesListCall struct { + s *Service + advertiserId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists creatives in an advertiser. The order is defined by the order_by +// parameter. If a filter by entity_status is not specified, creatives with +// `ENTITY_STATUS_ARCHIVED` will not be included in the results. +// +// - advertiserId: The ID of the advertiser to list creatives for. +func (r *AdvertisersCreativesService) List(advertiserId int64) *AdvertisersCreativesListCall { + c := &AdvertisersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + return c +} + +// Filter sets the optional parameter "filter": Allows filtering by creative +// fields. Supported syntax: * Filter expressions are made up of one or more +// restrictions. * Restrictions can be combined by `AND` or `OR` logical +// operators. A sequence of restrictions implicitly uses `AND`. * A restriction +// has the form of `{field} {operator} {value}`. * The `lineItemIds` field must +// use the `HAS (:)` operator. * The `updateTime` field must use the `GREATER +// THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` operators. * All +// other fields must use the `EQUALS (=)` operator. * For `entityStatus`, +// `minDuration`, `maxDuration`, `updateTime`, and `dynamic` fields, there may +// be at most one restriction. Supported Fields: * `approvalStatus` * +// `creativeId` * `creativeType` * `dimensions` (input in the form of +// `{width}x{height}`) * `dynamic` * `entityStatus` * `exchangeReviewStatus` +// (input in the form of `{exchange}-{reviewStatus}`) * `lineItemIds` * +// `maxDuration` (input in the form of `{duration}s`. Only seconds are +// supported) * `minDuration` (input in the form of `{duration}s`. Only seconds +// are supported) * `updateTime` (input in ISO 8601 format, or +// `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative resource's +// field value reflects the last time that a creative has been updated, which +// includes updates made by the system (e.g. creative review updates). +// Examples: * All native creatives: `creativeType="CREATIVE_TYPE_NATIVE" * +// All active creatives with 300x400 or 50x100 dimensions: +// `entityStatus="ENTITY_STATUS_ACTIVE" AND (dimensions="300x400" OR +// dimensions="50x100")` * All dynamic creatives that are approved by AdX or +// AppNexus, with a minimum duration of 5 seconds and 200ms: `dynamic="true" +// AND minDuration="5.2s" AND +// (exchangeReviewStatus="EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED" OR +// exchangeReviewStatus="EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED")` * All +// video creatives that are associated with line item ID 1 or 2: +// `creativeType="CREATIVE_TYPE_VIDEO" AND (lineItemIds:1 OR lineItemIds:2)` * +// Find creatives by multiple creative IDs: `creativeId=1 OR creativeId=2` * +// All creatives with an update time greater than or equal to +// 2020-11-04T18:54:47Z (format of ISO 8601): +// `updateTime>="2020-11-04T18:54:47Z" The length of this field should be no +// more than 500 characters. Reference our filter `LIST` requests +// (/display-video/api/guides/how-tos/filters) guide for more information. +func (c *AdvertisersCreativesListCall) Filter(filter string) *AdvertisersCreativesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * `creativeId` (default) * `createTime` * +// `mediaDuration` * `dimensions` (sorts by width first, then by height) The +// default sorting order is ascending. To specify descending order for a field, +// a suffix "desc" should be added to the field name. Example: `createTime +// desc`. +func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreativesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Must +// be between `1` and `200`. If unspecified will default to `100`. Returns +// error code `INVALID_ARGUMENT` if an invalid value is specified. +func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall { + 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. Typically, this is the value of +// next_page_token returned from the previous call to `ListCreatives` method. +// If not specified, the first page of results will be returned. +func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersCreativesListCall { + 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 *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *AdvertisersCreativesListCall { + 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 *AdvertisersCreativesListCall) IfNoneMatch(entityTag string) *AdvertisersCreativesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesListCall) Context(ctx context.Context) *AdvertisersCreativesListCall { + 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 *AdvertisersCreativesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListCreativesResponse.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 *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, 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 := &ListCreativesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.list", "response", internallog.HTTPResponse(res, b)) + 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 *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) 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 AdvertisersCreativesPatchCall struct { + s *Service + advertiserId int64 + creativeId int64 + creative *Creative + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing creative. Returns the updated creative if +// successful. A "Standard" user role +// (//support.google.com/displayvideo/answer/2723011) or greater for the parent +// advertiser or partner is required to make this request. +// +// - advertiserId: Output only. The unique ID of the advertiser the creative +// belongs to. +// - creativeId: Output only. The unique ID of the creative. Assigned by the +// system. +func (r *AdvertisersCreativesService) Patch(advertiserId int64, creativeId int64, creative *Creative) *AdvertisersCreativesPatchCall { + c := &AdvertisersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.creativeId = creativeId + c.creative = creative + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The mask to +// control which fields to update. +func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *AdvertisersCreativesPatchCall { + 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 *AdvertisersCreativesPatchCall) Fields(s ...googleapi.Field) *AdvertisersCreativesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesPatchCall) Context(ctx context.Context) *AdvertisersCreativesPatchCall { + 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 *AdvertisersCreativesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives/{+creativeId}") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "creativeId": strconv.FormatInt(c.creativeId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Creative.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 *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, 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 := &Creative{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersInsertionOrdersCreateCall struct { + s *Service + advertiserId int64 + insertionorder *InsertionOrder + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new insertion order. Returns the newly created insertion +// order if successful. +// +// - advertiserId: Output only. The unique ID of the advertiser the insertion +// order belongs to. +func (r *AdvertisersInsertionOrdersService) Create(advertiserId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersCreateCall { + c := &AdvertisersInsertionOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.insertionorder = insertionorder + 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 *AdvertisersInsertionOrdersCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersInsertionOrdersCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersCreateCall { + 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 *AdvertisersInsertionOrdersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertionorder) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.insertionOrders.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *InsertionOrder.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 *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, 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 := &InsertionOrder{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersInsertionOrdersDeleteCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an insertion order. Returns error code `NOT_FOUND` if the +// insertion order does not exist. The insertion order should be archived +// first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to +// delete it. +// +// - advertiserId: The ID of the advertiser this insertion order belongs to. +// - insertionOrderId: The ID of the insertion order to delete. +func (r *AdvertisersInsertionOrdersService) Delete(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersDeleteCall { + c := &AdvertisersInsertionOrdersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.insertionOrderId = insertionOrderId + 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 *AdvertisersInsertionOrdersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersInsertionOrdersDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersDeleteCall { + 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 *AdvertisersInsertionOrdersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.insertionOrders.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersInsertionOrdersGetCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an insertion order. Returns error code `NOT_FOUND` if the +// insertion order does not exist. // -// - advertiserId: The ID of the advertiser this creative belongs to. -// - creativeId: The ID of the creative to be deleted. -func (r *AdvertisersCreativesService) Delete(advertiserId int64, creativeId int64) *AdvertisersCreativesDeleteCall { - c := &AdvertisersCreativesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser this insertion order belongs to. +// - insertionOrderId: The ID of the insertion order to fetch. +func (r *AdvertisersInsertionOrdersService) Get(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersGetCall { + c := &AdvertisersInsertionOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.creativeId = creativeId + c.insertionOrderId = insertionOrderId 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 *AdvertisersCreativesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCreativesDeleteCall { +func (c *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersGetCall { 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 *AdvertisersInsertionOrdersGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesDeleteCall) Context(ctx context.Context) *AdvertisersCreativesDeleteCall { +func (c *AdvertisersInsertionOrdersGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersGetCall { 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 *AdvertisersCreativesDeleteCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "creativeId": strconv.FormatInt(c.creativeId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.delete" call. +// Do executes the "displayvideo.advertisers.insertionOrders.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *InsertionOrder.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 *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17901,7 +19351,7 @@ func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &InsertionOrder{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17912,35 +19362,85 @@ func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empt if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersCreativesGetCall struct { +type AdvertisersInsertionOrdersListCall struct { s *Service advertiserId int64 - creativeId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a creative. +// List: Lists insertion orders in an advertiser. The order is defined by the +// order_by parameter. If a filter by entity_status is not specified, insertion +// orders with `ENTITY_STATUS_ARCHIVED` will not be included in the results. // -// - advertiserId: The ID of the advertiser this creative belongs to. -// - creativeId: The ID of the creative to fetch. -func (r *AdvertisersCreativesService) Get(advertiserId int64, creativeId int64) *AdvertisersCreativesGetCall { - c := &AdvertisersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser to list insertion orders for. +func (r *AdvertisersInsertionOrdersService) List(advertiserId int64) *AdvertisersInsertionOrdersListCall { + c := &AdvertisersInsertionOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.creativeId = creativeId + return c +} + +// Filter sets the optional parameter "filter": Allows filtering by insertion +// order fields. Supported syntax: * Filter expressions are made up of one or +// more restrictions. * Restrictions can be combined by `AND` or `OR` logical +// operators. A sequence of restrictions implicitly uses `AND`. * A restriction +// has the form of `{field} {operator} {value}`. * The `updateTime` field must +// use the `GREATER THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` +// operators. * All other fields must use the `EQUALS (=)` operator. Supported +// fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` +// (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All +// insertion orders under a campaign: `campaignId="1234" * All +// `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders under an +// advertiser: `(entityStatus="ENTITY_STATUS_ACTIVE" OR +// entityStatus="ENTITY_STATUS_PAUSED")` * All insertion orders with an update +// time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): +// `updateTime<="2020-11-04T18:54:47Z" * All insertion orders with an update +// time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): +// `updateTime>="2020-11-04T18:54:47Z" The length of this field should be no +// more than 500 characters. Reference our filter `LIST` requests +// (/display-video/api/guides/how-tos/filters) guide for more information. +func (c *AdvertisersInsertionOrdersListCall) Filter(filter string) *AdvertisersInsertionOrdersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * "displayName" (default) * "entityStatus" * +// "updateTime" The default sorting order is ascending. To specify descending +// order for a field, a suffix "desc" should be added to the field name. +// Example: `displayName desc`. +func (c *AdvertisersInsertionOrdersListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Must +// be between `1` and `100`. If unspecified will default to `100`. Returns +// error code `INVALID_ARGUMENT` if an invalid value is specified. +func (c *AdvertisersInsertionOrdersListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListCall { + 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. Typically, this is the value of +// next_page_token returned from the previous call to `ListInsertionOrders` +// method. If not specified, the first page of results will be returned. +func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListCall { + 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 *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersCreativesGetCall { +func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17948,34 +19448,34 @@ func (c *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersC // 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 *AdvertisersCreativesGetCall) IfNoneMatch(entityTag string) *AdvertisersCreativesGetCall { +func (c *AdvertisersInsertionOrdersListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesGetCall) Context(ctx context.Context) *AdvertisersCreativesGetCall { +func (c *AdvertisersInsertionOrdersListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListCall { 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 *AdvertisersCreativesGetCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -17984,18 +19484,18 @@ func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, err req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "creativeId": strconv.FormatInt(c.creativeId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.get" call. +// Do executes the "displayvideo.advertisers.insertionOrders.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Creative.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 *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) { +// *ListInsertionOrdersResponse.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 *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrdersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18014,7 +19514,7 @@ func (c *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creativ if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Creative{ + ret := &ListInsertionOrdersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18025,94 +19525,98 @@ func (c *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creativ if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersCreativesListCall struct { - s *Service - advertiserId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(*ListInsertionOrdersResponse) 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) + } } -// List: Lists creatives in an advertiser. The order is defined by the order_by -// parameter. If a filter by entity_status is not specified, creatives with -// `ENTITY_STATUS_ARCHIVED` will not be included in the results. +type AdvertisersInsertionOrdersListAssignedTargetingOptionsCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListAssignedTargetingOptions: Lists assigned targeting options of an +// insertion order across targeting types. // -// - advertiserId: The ID of the advertiser to list creatives for. -func (r *AdvertisersCreativesService) List(advertiserId int64) *AdvertisersCreativesListCall { - c := &AdvertisersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - insertionOrderId: The ID of the insertion order to list assigned targeting +// options for. +func (r *AdvertisersInsertionOrdersService) ListAssignedTargetingOptions(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { + c := &AdvertisersInsertionOrdersListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId + c.insertionOrderId = insertionOrderId return c } -// Filter sets the optional parameter "filter": Allows filtering by creative -// fields. Supported syntax: * Filter expressions are made up of one or more -// restrictions. * Restrictions can be combined by `AND` or `OR` logical -// operators. A sequence of restrictions implicitly uses `AND`. * A restriction -// has the form of `{field} {operator} {value}`. * The `lineItemIds` field must -// use the `HAS (:)` operator. * The `updateTime` field must use the `GREATER -// THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` operators. * All -// other fields must use the `EQUALS (=)` operator. * For `entityStatus`, -// `minDuration`, `maxDuration`, `updateTime`, and `dynamic` fields, there may -// be at most one restriction. Supported Fields: * `approvalStatus` * -// `creativeId` * `creativeType` * `dimensions` (input in the form of -// `{width}x{height}`) * `dynamic` * `entityStatus` * `exchangeReviewStatus` -// (input in the form of `{exchange}-{reviewStatus}`) * `lineItemIds` * -// `maxDuration` (input in the form of `{duration}s`. Only seconds are -// supported) * `minDuration` (input in the form of `{duration}s`. Only seconds -// are supported) * `updateTime` (input in ISO 8601 format, or -// `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative resource's -// field value reflects the last time that a creative has been updated, which -// includes updates made by the system (e.g. creative review updates). -// Examples: * All native creatives: `creativeType="CREATIVE_TYPE_NATIVE" * -// All active creatives with 300x400 or 50x100 dimensions: -// `entityStatus="ENTITY_STATUS_ACTIVE" AND (dimensions="300x400" OR -// dimensions="50x100")` * All dynamic creatives that are approved by AdX or -// AppNexus, with a minimum duration of 5 seconds and 200ms: `dynamic="true" -// AND minDuration="5.2s" AND -// (exchangeReviewStatus="EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED" OR -// exchangeReviewStatus="EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED")` * All -// video creatives that are associated with line item ID 1 or 2: -// `creativeType="CREATIVE_TYPE_VIDEO" AND (lineItemIds:1 OR lineItemIds:2)` * -// Find creatives by multiple creative IDs: `creativeId=1 OR creativeId=2` * -// All creatives with an update time greater than or equal to -// 2020-11-04T18:54:47Z (format of ISO 8601): -// `updateTime>="2020-11-04T18:54:47Z" The length of this field should be no +// Filter sets the optional parameter "filter": Allows filtering by assigned +// targeting option fields. Supported syntax: * Filter expressions are made up +// of one or more restrictions. * Restrictions can be combined by the logical +// operator `OR`. * A restriction has the form of `{field} {operator} {value}`. +// * All fields must use the `EQUALS (=)` operator. Supported fields: * +// `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` +// resources of targeting type `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` or +// `TARGETING_TYPE_CHANNEL`: +// `targetingType="TARGETING_TYPE_PROXIMITY_LOCATION_LIST" OR +// targetingType="TARGETING_TYPE_CHANNEL" * `AssignedTargetingOption` +// resources with inheritance status of `NOT_INHERITED` or +// `INHERITED_FROM_PARTNER`: `inheritance="NOT_INHERITED" OR +// inheritance="INHERITED_FROM_PARTNER" The length of this field should be no // more than 500 characters. Reference our filter `LIST` requests // (/display-video/api/guides/how-tos/filters) guide for more information. -func (c *AdvertisersCreativesListCall) Filter(filter string) *AdvertisersCreativesListCall { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Field by which to sort the -// list. Acceptable values are: * `creativeId` (default) * `createTime` * -// `mediaDuration` * `dimensions` (sorts by width first, then by height) The -// default sorting order is ascending. To specify descending order for a field, -// a suffix "desc" should be added to the field name. Example: `createTime -// desc`. -func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreativesListCall { +// list. Acceptable values are: * `targetingType` (default) The default sorting +// order is ascending. To specify descending order for a field, a suffix "desc" +// should be added to the field name. Example: `targetingType desc`. +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.urlParams_.Set("orderBy", orderBy) return c } -// PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `200`. If unspecified will default to `100`. Returns -// error code `INVALID_ARGUMENT` if an invalid value is specified. -func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. The +// size must be an integer between `1` and `5000`. If unspecified, the default +// is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is +// specified. +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { 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. Typically, this is the value of -// next_page_token returned from the previous call to `ListCreatives` method. -// If not specified, the first page of results will be returned. -func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersCreativesListCall { +// PageToken sets the optional parameter "pageToken": A token that lets the +// client fetch the next page of results. Typically, this is the value of +// next_page_token returned from the previous call to +// `BulkListInsertionOrderAssignedTargetingOptions` method. If not specified, +// the first page of results will be returned. +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18120,7 +19624,7 @@ func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersC // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *AdvertisersCreativesListCall { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18128,34 +19632,34 @@ func (c *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *Advertisers // 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 *AdvertisersCreativesListCall) IfNoneMatch(entityTag string) *AdvertisersCreativesListCall { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesListCall) Context(ctx context.Context) *AdvertisersCreativesListCall { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { 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 *AdvertisersCreativesListCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}:listAssignedTargetingOptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -18163,19 +19667,22 @@ func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.listAssignedTargetingOptions", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.list" call. +// Do executes the "displayvideo.advertisers.insertionOrders.listAssignedTargetingOptions" call. // Any non-2xx status code is an error. Response headers are in either -// *ListCreativesResponse.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 *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) { +// *BulkListInsertionOrderAssignedTargetingOptionsResponse.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 *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListInsertionOrderAssignedTargetingOptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18194,7 +19701,7 @@ func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCreativesResponse{ + ret := &BulkListInsertionOrderAssignedTargetingOptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18205,14 +19712,14 @@ func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCr if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.listAssignedTargetingOptions", "response", internallog.HTTPResponse(res, b)) 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 *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListInsertionOrderAssignedTargetingOptionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18230,36 +19737,34 @@ func (c *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCr } } -type AdvertisersCreativesPatchCall struct { - s *Service - advertiserId int64 - creativeId int64 - creative *Creative - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersPatchCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + insertionorder *InsertionOrder + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an existing creative. Returns the updated creative if -// successful. A "Standard" user role -// (//support.google.com/displayvideo/answer/2723011) or greater for the parent -// advertiser or partner is required to make this request. +// Patch: Updates an existing insertion order. Returns the updated insertion +// order if successful. // -// - advertiserId: Output only. The unique ID of the advertiser the creative -// belongs to. -// - creativeId: Output only. The unique ID of the creative. Assigned by the -// system. -func (r *AdvertisersCreativesService) Patch(advertiserId int64, creativeId int64, creative *Creative) *AdvertisersCreativesPatchCall { - c := &AdvertisersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: Output only. The unique ID of the advertiser the insertion +// order belongs to. +// - insertionOrderId: Output only. The unique ID of the insertion order. +// Assigned by the system. +func (r *AdvertisersInsertionOrdersService) Patch(advertiserId int64, insertionOrderId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersPatchCall { + c := &AdvertisersInsertionOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.creativeId = creativeId - c.creative = creative + c.insertionOrderId = insertionOrderId + c.insertionorder = insertionorder return c } // UpdateMask sets the optional parameter "updateMask": Required. The mask to // control which fields to update. -func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *AdvertisersCreativesPatchCall { +func (c *AdvertisersInsertionOrdersPatchCall) UpdateMask(updateMask string) *AdvertisersInsertionOrdersPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -18267,35 +19772,35 @@ func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *Advertise // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AdvertisersCreativesPatchCall) Fields(s ...googleapi.Field) *AdvertisersCreativesPatchCall { +func (c *AdvertisersInsertionOrdersPatchCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesPatchCall) Context(ctx context.Context) *AdvertisersCreativesPatchCall { +func (c *AdvertisersInsertionOrdersPatchCall) Context(ctx context.Context) *AdvertisersInsertionOrdersPatchCall { 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 *AdvertisersCreativesPatchCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertionorder) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -18303,19 +19808,19 @@ func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, e } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "creativeId": strconv.FormatInt(c.creativeId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.patch" call. +// Do executes the "displayvideo.advertisers.insertionOrders.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Creative.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *InsertionOrder.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 *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) { +func (c *AdvertisersInsertionOrdersPatchCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18334,7 +19839,7 @@ func (c *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Creative{ + ret := &InsertionOrder{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18345,63 +19850,88 @@ func (c *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creat if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersInsertionOrdersCreateCall struct { - s *Service - advertiserId int64 - insertionorder *InsertionOrder - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + assignedtargetingoption *AssignedTargetingOption + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new insertion order. Returns the newly created insertion -// order if successful. +// Create: Assigns a targeting option to an insertion order. Returns the +// assigned targeting option if successful. Supported targeting types: * +// `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * +// `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * +// `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY` // -// - advertiserId: Output only. The unique ID of the advertiser the insertion -// order belongs to. -func (r *AdvertisersInsertionOrdersService) Create(advertiserId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersCreateCall { - c := &AdvertisersInsertionOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - insertionOrderId: The ID of the insertion order the assigned targeting +// option will belong to. +// - targetingType: Identifies the type of this assigned targeting option. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * +// `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` +// - `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, insertionOrderId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.insertionorder = insertionorder + c.insertionOrderId = insertionOrderId + c.targetingType = targetingType + c.assignedtargetingoption = assignedtargetingoption 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 *AdvertisersInsertionOrdersCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersCreateCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersCreateCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall { 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 *AdvertisersInsertionOrdersCreateCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertionorder) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.assignedtargetingoption) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18409,18 +19939,21 @@ func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.create" call. +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *InsertionOrder.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 *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { +// *AssignedTargetingOption.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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18439,7 +19972,7 @@ func (c *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InsertionOrder{ + ret := &AssignedTargetingOption{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18450,61 +19983,85 @@ func (c *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersInsertionOrdersDeleteCall struct { - s *Service - advertiserId int64 - insertionOrderId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + assignedTargetingOptionId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an insertion order. Returns error code `NOT_FOUND` if the -// insertion order does not exist. The insertion order should be archived -// first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to -// delete it. +// Delete: Deletes an assigned targeting option from an insertion order. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * +// `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY` // -// - advertiserId: The ID of the advertiser this insertion order belongs to. -// - insertionOrderId: The ID of the insertion order to delete. -func (r *AdvertisersInsertionOrdersService) Delete(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersDeleteCall { - c := &AdvertisersInsertionOrdersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - assignedTargetingOptionId: The ID of the assigned targeting option to +// delete. +// - insertionOrderId: The ID of the insertion order the assigned targeting +// option belongs to. +// - targetingType: Identifies the type of this assigned targeting option. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * +// `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` +// - `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.insertionOrderId = insertionOrderId + c.targetingType = targetingType + c.assignedTargetingOptionId = assignedTargetingOptionId 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 *AdvertisersInsertionOrdersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersDeleteCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersDeleteCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall { 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 *AdvertisersInsertionOrdersDeleteCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, nil) if err != nil { @@ -18512,19 +20069,21 @@ func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, + "assignedTargetingOptionId": c.assignedTargetingOptionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.delete" call. +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Empty.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18554,36 +20113,70 @@ func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersInsertionOrdersGetCall struct { - s *Service - advertiserId int64 - insertionOrderId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + assignedTargetingOptionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Gets an insertion order. Returns error code `NOT_FOUND` if the -// insertion order does not exist. +// Get: Gets a single targeting option assigned to an insertion order. // -// - advertiserId: The ID of the advertiser this insertion order belongs to. -// - insertionOrderId: The ID of the insertion order to fetch. -func (r *AdvertisersInsertionOrdersService) Get(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersGetCall { - c := &AdvertisersInsertionOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - assignedTargetingOptionId: An identifier unique to the targeting type in +// this insertion order that identifies the assigned targeting option being +// requested. +// - insertionOrderId: The ID of the insertion order the assigned targeting +// option belongs to. +// - targetingType: Identifies the type of this assigned targeting option. +// Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * +// `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * +// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * +// `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * +// `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * +// `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * +// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * +// `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * +// `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * +// `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * +// `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * +// `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * +// `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * +// `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * +// `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * +// `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * +// `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.insertionOrderId = insertionOrderId + c.targetingType = targetingType + c.assignedTargetingOptionId = assignedTargetingOptionId 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 *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersGetCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18591,34 +20184,34 @@ func (c *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *Advert // 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 *AdvertisersInsertionOrdersGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersGetCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersGetCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { 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 *AdvertisersInsertionOrdersGetCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -18626,19 +20219,22 @@ func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, + "assignedTargetingOptionId": c.assignedTargetingOptionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.get" call. +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *InsertionOrder.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 *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { +// *AssignedTargetingOption.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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18657,7 +20253,7 @@ func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*I if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InsertionOrder{ + ret := &AssignedTargetingOption{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18668,77 +20264,103 @@ func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*I if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersInsertionOrdersListCall struct { - s *Service - advertiserId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Lists insertion orders in an advertiser. The order is defined by the -// order_by parameter. If a filter by entity_status is not specified, insertion -// orders with `ENTITY_STATUS_ARCHIVED` will not be included in the results. +// List: Lists the targeting options assigned to an insertion order. // -// - advertiserId: The ID of the advertiser to list insertion orders for. -func (r *AdvertisersInsertionOrdersService) List(advertiserId int64) *AdvertisersInsertionOrdersListCall { - c := &AdvertisersInsertionOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - insertionOrderId: The ID of the insertion order to list assigned targeting +// options for. +// - targetingType: Identifies the type of assigned targeting options to list. +// Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * +// `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * +// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * +// `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * +// `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * +// `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * +// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * +// `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * +// `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * +// `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * +// `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * +// `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * +// `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * +// `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * +// `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * +// `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * +// `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, insertionOrderId int64, targetingType string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId + c.insertionOrderId = insertionOrderId + c.targetingType = targetingType return c } -// Filter sets the optional parameter "filter": Allows filtering by insertion -// order fields. Supported syntax: * Filter expressions are made up of one or -// more restrictions. * Restrictions can be combined by `AND` or `OR` logical -// operators. A sequence of restrictions implicitly uses `AND`. * A restriction -// has the form of `{field} {operator} {value}`. * The `updateTime` field must -// use the `GREATER THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` -// operators. * All other fields must use the `EQUALS (=)` operator. Supported -// fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` -// (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All -// insertion orders under a campaign: `campaignId="1234" * All -// `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders under an -// advertiser: `(entityStatus="ENTITY_STATUS_ACTIVE" OR -// entityStatus="ENTITY_STATUS_PAUSED")` * All insertion orders with an update -// time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): -// `updateTime<="2020-11-04T18:54:47Z" * All insertion orders with an update -// time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): -// `updateTime>="2020-11-04T18:54:47Z" The length of this field should be no +// Filter sets the optional parameter "filter": Allows filtering by assigned +// targeting option fields. Supported syntax: * Filter expressions are made up +// of one or more restrictions. * Restrictions can be combined by the logical +// operator `OR`. * A restriction has the form of `{field} {operator} {value}`. +// * All fields must use the `EQUALS (=)` operator. Supported fields: * +// `assignedTargetingOptionId` * `inheritance` Examples: * +// `AssignedTargetingOption` resources with ID 1 or 2: +// `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" * +// `AssignedTargetingOption` resources with inheritance status of +// `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance="NOT_INHERITED" OR +// inheritance="INHERITED_FROM_PARTNER" The length of this field should be no // more than 500 characters. Reference our filter `LIST` requests // (/display-video/api/guides/how-tos/filters) guide for more information. -func (c *AdvertisersInsertionOrdersListCall) Filter(filter string) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Field by which to sort the -// list. Acceptable values are: * "displayName" (default) * "entityStatus" * -// "updateTime" The default sorting order is ascending. To specify descending -// order for a field, a suffix "desc" should be added to the field name. -// Example: `displayName desc`. -func (c *AdvertisersInsertionOrdersListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListCall { +// list. Acceptable values are: * `assignedTargetingOptionId` (default) The +// default sorting order is ascending. To specify descending order for a field, +// a suffix "desc" should be added to the field name. Example: +// `assignedTargetingOptionId desc`. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `100`. If unspecified will default to `100`. Returns +// be between `1` and `5000`. If unspecified will default to `100`. Returns // error code `INVALID_ARGUMENT` if an invalid value is specified. -func (c *AdvertisersInsertionOrdersListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 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. Typically, this is the value of -// next_page_token returned from the previous call to `ListInsertionOrders` -// method. If not specified, the first page of results will be returned. -func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListCall { +// next_page_token returned from the previous call to +// `ListInsertionOrderAssignedTargetingOptions` method. If not specified, the +// first page of results will be returned. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18746,7 +20368,7 @@ func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *Advert // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18754,34 +20376,34 @@ func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *Adver // 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 *AdvertisersInsertionOrdersListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 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 *AdvertisersInsertionOrdersListCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -18789,19 +20411,21 @@ func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.list" call. +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListInsertionOrdersResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *ListInsertionOrderAssignedTargetingOptionsResponse.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 *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrdersResponse, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrderAssignedTargetingOptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18820,7 +20444,7 @@ func (c *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListInsertionOrdersResponse{ + ret := &ListInsertionOrderAssignedTargetingOptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18831,14 +20455,14 @@ func (c *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list", "response", internallog.HTTPResponse(res, b)) 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 *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(*ListInsertionOrdersResponse) error) error { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListInsertionOrderAssignedTargetingOptionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18856,123 +20480,6 @@ func (c *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(* } } -type AdvertisersInsertionOrdersPatchCall struct { - s *Service - advertiserId int64 - insertionOrderId int64 - insertionorder *InsertionOrder - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing insertion order. Returns the updated insertion -// order if successful. -// -// - advertiserId: Output only. The unique ID of the advertiser the insertion -// order belongs to. -// - insertionOrderId: Output only. The unique ID of the insertion order. -// Assigned by the system. -func (r *AdvertisersInsertionOrdersService) Patch(advertiserId int64, insertionOrderId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersPatchCall { - c := &AdvertisersInsertionOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.advertiserId = advertiserId - c.insertionOrderId = insertionOrderId - c.insertionorder = insertionorder - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The mask to -// control which fields to update. -func (c *AdvertisersInsertionOrdersPatchCall) UpdateMask(updateMask string) *AdvertisersInsertionOrdersPatchCall { - 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 *AdvertisersInsertionOrdersPatchCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersPatchCall) Context(ctx context.Context) *AdvertisersInsertionOrdersPatchCall { - 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 *AdvertisersInsertionOrdersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AdvertisersInsertionOrdersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertionorder) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") - 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{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "displayvideo.advertisers.insertionOrders.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *InsertionOrder.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 *AdvertisersInsertionOrdersPatchCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, 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 := &InsertionOrder{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - type AdvertisersInvoicesListCall struct { s *Service advertiserId int64 diff --git a/displayvideo/v3/displayvideo-api.json b/displayvideo/v3/displayvideo-api.json index fa0fcf8b1d..6c66e569b2 100644 --- a/displayvideo/v3/displayvideo-api.json +++ b/displayvideo/v3/displayvideo-api.json @@ -9268,7 +9268,7 @@ } } }, - "revision": "20250709", + "revision": "20250729", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -13523,7 +13523,7 @@ true, true, true, - false, + true, false, false, false, @@ -21389,7 +21389,7 @@ true, true, true, - false, + true, false, false, false, @@ -21475,7 +21475,7 @@ true, true, true, - false, + true, false, false, false, diff --git a/displayvideo/v4/displayvideo-api.json b/displayvideo/v4/displayvideo-api.json index 4da8442fc3..94f3efe6e6 100644 --- a/displayvideo/v4/displayvideo-api.json +++ b/displayvideo/v4/displayvideo-api.json @@ -1130,18 +1130,18 @@ "https://www.googleapis.com/auth/display-video-mediaplanning" ] }, - "patch": { - "description": "Updates an existing campaign. Returns the updated campaign if successful.", - "flatPath": "v4/advertisers/{advertisersId}/campaigns/{campaignsId}", - "httpMethod": "PATCH", - "id": "displayvideo.advertisers.campaigns.patch", + "listAssignedTargetingOptions": { + "description": "Lists assigned targeting options of a campaign across targeting types.", + "flatPath": "v4/advertisers/{advertisersId}/campaigns/{campaignsId}:listAssignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.campaigns.listAssignedTargetingOptions", "parameterOrder": [ "advertiserId", "campaignId" ], "parameters": { "advertiserId": { - "description": "Output only. The unique ID of the advertiser the campaign belongs to.", + "description": "Required. The ID of the advertiser the campaign belongs to.", "format": "int64", "location": "path", "pattern": "^[^/]+$", @@ -1149,123 +1149,7 @@ "type": "string" }, "campaignId": { - "description": "Output only. The unique ID of the campaign. Assigned by the system.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The mask to control which fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}", - "request": { - "$ref": "Campaign" - }, - "response": { - "$ref": "Campaign" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video", - "https://www.googleapis.com/auth/display-video-mediaplanning" - ] - } - } - }, - "channels": { - "methods": { - "create": { - "description": "Creates a new channel. Returns the newly created channel if successful.", - "flatPath": "v4/advertisers/{advertisersId}/channels", - "httpMethod": "POST", - "id": "displayvideo.advertisers.channels.create", - "parameterOrder": [ - "advertiserId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the created channel.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the created channel.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "v4/advertisers/{+advertiserId}/channels", - "request": { - "$ref": "Channel" - }, - "response": { - "$ref": "Channel" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "get": { - "description": "Gets a channel for a partner or advertiser.", - "flatPath": "v4/advertisers/{advertisersId}/channels/{channelsId}", - "httpMethod": "GET", - "id": "displayvideo.advertisers.channels.get", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the fetched channel.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the channel to fetch.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the fetched channel.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "v4/advertisers/{+advertiserId}/channels/{+channelId}", - "response": { - "$ref": "Channel" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "list": { - "description": "Lists channels for a partner or advertiser.", - "flatPath": "v4/advertisers/{advertisersId}/channels", - "httpMethod": "GET", - "id": "displayvideo.advertisers.channels.list", - "parameterOrder": [ - "advertiserId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the channels.", + "description": "Required. The ID of the campaign to list assigned targeting options for.", "format": "int64", "location": "path", "pattern": "^[^/]+$", @@ -1273,72 +1157,61 @@ "type": "string" }, "filter": { - "description": "Allows filtering by channel fields. Supported syntax: * Filter expressions for channel can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All channels for which the display name contains \"google\": `displayName : \"google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` resources of targeting type `TARGETING_TYPE_LANGUAGE` or `TARGETING_TYPE_GENDER`: `targetingType=\"TARGETING_TYPE_LANGUAGE\" OR targetingType=\"TARGETING_TYPE_GENDER\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", "location": "query", "type": "string" }, "orderBy": { - "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `channelId` The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `displayName desc`.", + "description": "Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingType desc`.", "location": "query", "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListChannels` method. If not specified, the first page of results will be returned.", - "location": "query", - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the channels.", - "format": "int64", + "description": "A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", "location": "query", "type": "string" } }, - "path": "v4/advertisers/{+advertiserId}/channels", + "path": "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}:listAssignedTargetingOptions", "response": { - "$ref": "ListChannelsResponse" + "$ref": "BulkListCampaignAssignedTargetingOptionsResponse" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, "patch": { - "description": "Updates a channel. Returns the updated channel if successful.", - "flatPath": "v4/advertisers/{advertisersId}/channels/{channelId}", + "description": "Updates an existing campaign. Returns the updated campaign if successful.", + "flatPath": "v4/advertisers/{advertisersId}/campaigns/{campaignsId}", "httpMethod": "PATCH", - "id": "displayvideo.advertisers.channels.patch", + "id": "displayvideo.advertisers.campaigns.patch", "parameterOrder": [ "advertiserId", - "channelId" + "campaignId" ], "parameters": { "advertiserId": { - "description": "The ID of the advertiser that owns the created channel.", + "description": "Output only. The unique ID of the advertiser the campaign belongs to.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" }, - "channelId": { - "description": "Output only. The unique ID of the channel. Assigned by the system.", + "campaignId": { + "description": "Output only. The unique ID of the campaign. Assigned by the system.", "format": "int64", "location": "path", + "pattern": "^[^/]+$", "required": true, "type": "string" }, - "partnerId": { - "description": "The ID of the partner that owns the created channel.", - "format": "int64", - "location": "query", - "type": "string" - }, "updateMask": { "description": "Required. The mask to control which fields to update.", "format": "google-fieldmask", @@ -1346,364 +1219,442 @@ "type": "string" } }, - "path": "v4/advertisers/{+advertiserId}/channels/{channelId}", + "path": "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}", "request": { - "$ref": "Channel" + "$ref": "Campaign" }, "response": { - "$ref": "Channel" + "$ref": "Campaign" }, "scopes": [ - "https://www.googleapis.com/auth/display-video" + "https://www.googleapis.com/auth/display-video", + "https://www.googleapis.com/auth/display-video-mediaplanning" ] } }, "resources": { - "sites": { - "methods": { - "bulkEdit": { - "description": "Bulk edits sites under a single channel. The operation will delete the sites provided in BulkEditSitesRequest.deleted_sites and then create the sites provided in BulkEditSitesRequest.created_sites.", - "flatPath": "v4/advertisers/{advertiserId}/channels/{channelsId}/sites:bulkEdit", - "httpMethod": "POST", - "id": "displayvideo.advertisers.channels.sites.bulkEdit", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel to which the sites belong.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v4/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit", - "request": { - "$ref": "BulkEditSitesRequest" - }, - "response": { - "$ref": "BulkEditSitesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "create": { - "description": "Creates a site in a channel.", - "flatPath": "v4/advertisers/{advertiserId}/channels/{channelsId}/sites", - "httpMethod": "POST", - "id": "displayvideo.advertisers.channels.sites.create", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel in which the site will be created.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the parent channel.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "v4/advertisers/{advertiserId}/channels/{+channelId}/sites", - "request": { - "$ref": "Site" - }, - "response": { - "$ref": "Site" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "delete": { - "description": "Deletes a site from a channel.", - "flatPath": "v4/advertisers/{advertiserId}/channels/{channelsId}/sites/{sitesId}", - "httpMethod": "DELETE", - "id": "displayvideo.advertisers.channels.sites.delete", - "parameterOrder": [ - "advertiserId", - "channelId", - "urlOrAppId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel to which the site belongs.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "partnerId": { - "description": "The ID of the partner that owns the parent channel.", - "format": "int64", - "location": "query", - "type": "string" - }, - "urlOrAppId": { - "description": "Required. The URL or app ID of the site to delete.", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v4/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "list": { - "description": "Lists sites in a channel.", - "flatPath": "v4/advertisers/{advertisersId}/channels/{channelsId}/sites", - "httpMethod": "GET", - "id": "displayvideo.advertisers.channels.sites.list", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel to which the requested sites belong.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "filter": { - "description": "Allows filtering by site fields. Supported syntax: * Filter expressions for site retrieval can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID contains \"google\": `urlOrAppId : \"google\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Field by which to sort the list. Acceptable values are: * `urlOrAppId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `urlOrAppId desc`.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListSites` method. If not specified, the first page of results will be returned.", - "location": "query", - "type": "string" + "targetingTypes": { + "resources": { + "assignedTargetingOptions": { + "methods": { + "get": { + "description": "Gets a single targeting option assigned to a campaign.", + "flatPath": "v4/advertisers/{advertisersId}/campaigns/{campaignsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get", + "parameterOrder": [ + "advertiserId", + "campaignId", + "targetingType", + "assignedTargetingOptionId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the campaign belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "assignedTargetingOptionId": { + "description": "Required. An identifier unique to the targeting type in this campaign that identifies the assigned targeting option being requested.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "campaignId": { + "description": "Required. The ID of the campaign the assigned targeting option belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION", + "TARGETING_TYPE_CONTENT_THEME_EXCLUSION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API.", + "Filter website content by content themes (for example, religion). Only supported for Advertiser resources. Targeting of this type cannot be created or updated using the API. This targeting is only inherited by child YouTube and Demand Gen line item resources." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + "response": { + "$ref": "AssignedTargetingOption" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] }, - "partnerId": { - "description": "The ID of the partner that owns the parent channel.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "v4/advertisers/{+advertiserId}/channels/{+channelId}/sites", - "response": { - "$ref": "ListSitesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "replace": { - "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", - "flatPath": "v4/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", - "httpMethod": "POST", - "id": "displayvideo.advertisers.channels.sites.replace", - "parameterOrder": [ - "advertiserId", - "channelId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser that owns the parent channel.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "channelId": { - "description": "Required. The ID of the parent channel whose sites will be replaced.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" + "list": { + "description": "Lists the targeting options assigned to a campaign for a specified targeting type.", + "flatPath": "v4/advertisers/{advertisersId}/campaigns/{campaignsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list", + "parameterOrder": [ + "advertiserId", + "campaignId", + "targetingType" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the campaign belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "campaignId": { + "description": "Required. The ID of the campaign to list assigned targeting options for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedTargetingOptionId` * `inheritance` Examples: * `AssignedTargetingOption` resources with ID 1 or 2 `assignedTargetingOptionId=\"1\" OR assignedTargetingOptionId=\"2\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER` `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `5000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION", + "TARGETING_TYPE_CONTENT_THEME_EXCLUSION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API.", + "Filter website content by content themes (for example, religion). Only supported for Advertiser resources. Targeting of this type cannot be created or updated using the API. This targeting is only inherited by child YouTube and Demand Gen line item resources." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions", + "response": { + "$ref": "ListCampaignAssignedTargetingOptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] } - }, - "path": "v4/advertisers/{advertiserId}/channels/{+channelId}/sites:replace", - "request": { - "$ref": "ReplaceSitesRequest" - }, - "response": { - "$ref": "ReplaceSitesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] + } } } } } }, - "creatives": { + "channels": { "methods": { "create": { - "description": "Creates a new creative. Returns the newly created creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", - "flatPath": "v4/advertisers/{advertisersId}/creatives", + "description": "Creates a new channel. Returns the newly created channel if successful.", + "flatPath": "v4/advertisers/{advertisersId}/channels", "httpMethod": "POST", - "id": "displayvideo.advertisers.creatives.create", + "id": "displayvideo.advertisers.channels.create", "parameterOrder": [ "advertiserId" ], "parameters": { "advertiserId": { - "description": "Output only. The unique ID of the advertiser the creative belongs to.", + "description": "The ID of the advertiser that owns the created channel.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the created channel.", + "format": "int64", + "location": "query", + "type": "string" } }, - "path": "v4/advertisers/{+advertiserId}/creatives", + "path": "v4/advertisers/{+advertiserId}/channels", "request": { - "$ref": "Creative" + "$ref": "Channel" }, "response": { - "$ref": "Creative" + "$ref": "Channel" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, - "delete": { - "description": "Deletes a creative. Returns error code `NOT_FOUND` if the creative does not exist. The creative should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be deleted. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", - "flatPath": "v4/advertisers/{advertisersId}/creatives/{creativesId}", - "httpMethod": "DELETE", - "id": "displayvideo.advertisers.creatives.delete", + "get": { + "description": "Gets a channel for a partner or advertiser.", + "flatPath": "v4/advertisers/{advertisersId}/channels/{channelsId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.channels.get", "parameterOrder": [ "advertiserId", - "creativeId" + "channelId" ], "parameters": { "advertiserId": { - "description": "The ID of the advertiser this creative belongs to.", + "description": "The ID of the advertiser that owns the fetched channel.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" }, - "creativeId": { - "description": "The ID of the creative to be deleted.", + "channelId": { + "description": "Required. The ID of the channel to fetch.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the fetched channel.", + "format": "int64", + "location": "query", + "type": "string" } }, - "path": "v4/advertisers/{+advertiserId}/creatives/{+creativeId}", + "path": "v4/advertisers/{+advertiserId}/channels/{+channelId}", "response": { - "$ref": "Empty" + "$ref": "Channel" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, - "get": { - "description": "Gets a creative.", - "flatPath": "v4/advertisers/{advertisersId}/creatives/{creativesId}", + "list": { + "description": "Lists channels for a partner or advertiser.", + "flatPath": "v4/advertisers/{advertisersId}/channels", "httpMethod": "GET", - "id": "displayvideo.advertisers.creatives.get", + "id": "displayvideo.advertisers.channels.list", "parameterOrder": [ - "advertiserId", - "creativeId" + "advertiserId" ], "parameters": { "advertiserId": { - "description": "Required. The ID of the advertiser this creative belongs to.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - }, - "creativeId": { - "description": "Required. The ID of the creative to fetch.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v4/advertisers/{+advertiserId}/creatives/{+creativeId}", - "response": { - "$ref": "Creative" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "list": { - "description": "Lists creatives in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, creatives with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", - "flatPath": "v4/advertisers/{advertisersId}/creatives", - "httpMethod": "GET", - "id": "displayvideo.advertisers.creatives.list", - "parameterOrder": [ - "advertiserId" - ], - "parameters": { - "advertiserId": { - "description": "Required. The ID of the advertiser to list creatives for.", + "description": "The ID of the advertiser that owns the channels.", "format": "int64", "location": "path", "pattern": "^[^/]+$", @@ -1711,12 +1662,12 @@ "type": "string" }, "filter": { - "description": "Allows filtering by creative fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `lineItemIds` field must use the `HAS (:)` operator. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. * For `entityStatus`, `minDuration`, `maxDuration`, `updateTime`, and `dynamic` fields, there may be at most one restriction. Supported Fields: * `approvalStatus` * `creativeId` * `creativeType` * `dimensions` (input in the form of `{width}x{height}`) * `dynamic` * `entityStatus` * `exchangeReviewStatus` (input in the form of `{exchange}-{reviewStatus}`) * `lineItemIds` * `maxDuration` (input in the form of `{duration}s`. Only seconds are supported) * `minDuration` (input in the form of `{duration}s`. Only seconds are supported) * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative resource's field value reflects the last time that a creative has been updated, which includes updates made by the system (e.g. creative review updates). Examples: * All native creatives: `creativeType=\"CREATIVE_TYPE_NATIVE\"` * All active creatives with 300x400 or 50x100 dimensions: `entityStatus=\"ENTITY_STATUS_ACTIVE\" AND (dimensions=\"300x400\" OR dimensions=\"50x100\")` * All dynamic creatives that are approved by AdX or AppNexus, with a minimum duration of 5 seconds and 200ms: `dynamic=\"true\" AND minDuration=\"5.2s\" AND (exchangeReviewStatus=\"EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED\" OR exchangeReviewStatus=\"EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED\")` * All video creatives that are associated with line item ID 1 or 2: `creativeType=\"CREATIVE_TYPE_VIDEO\" AND (lineItemIds:1 OR lineItemIds:2)` * Find creatives by multiple creative IDs: `creativeId=1 OR creativeId=2` * All creatives with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "description": "Allows filtering by channel fields. Supported syntax: * Filter expressions for channel can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All channels for which the display name contains \"google\": `displayName : \"google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", "location": "query", "type": "string" }, "orderBy": { - "description": "Field by which to sort the list. Acceptable values are: * `creativeId` (default) * `createTime` * `mediaDuration` * `dimensions` (sorts by width first, then by height) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `createTime desc`.", + "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `channelId` The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `displayName desc`.", "location": "query", "type": "string" }, @@ -1727,45 +1678,56 @@ "type": "integer" }, "pageToken": { - "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCreatives` method. If not specified, the first page of results will be returned.", + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListChannels` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the channels.", + "format": "int64", "location": "query", "type": "string" } }, - "path": "v4/advertisers/{+advertiserId}/creatives", + "path": "v4/advertisers/{+advertiserId}/channels", "response": { - "$ref": "ListCreativesResponse" + "$ref": "ListChannelsResponse" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, "patch": { - "description": "Updates an existing creative. Returns the updated creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", - "flatPath": "v4/advertisers/{advertisersId}/creatives/{creativesId}", + "description": "Updates a channel. Returns the updated channel if successful.", + "flatPath": "v4/advertisers/{advertisersId}/channels/{channelId}", "httpMethod": "PATCH", - "id": "displayvideo.advertisers.creatives.patch", + "id": "displayvideo.advertisers.channels.patch", "parameterOrder": [ "advertiserId", - "creativeId" + "channelId" ], "parameters": { "advertiserId": { - "description": "Output only. The unique ID of the advertiser the creative belongs to.", + "description": "The ID of the advertiser that owns the created channel.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" }, - "creativeId": { - "description": "Output only. The unique ID of the creative. Assigned by the system.", + "channelId": { + "description": "Output only. The unique ID of the channel. Assigned by the system.", "format": "int64", "location": "path", - "pattern": "^[^/]+$", "required": true, "type": "string" }, + "partnerId": { + "description": "The ID of the partner that owns the created channel.", + "format": "int64", + "location": "query", + "type": "string" + }, "updateMask": { "description": "Required. The mask to control which fields to update.", "format": "google-fieldmask", @@ -1773,210 +1735,1331 @@ "type": "string" } }, - "path": "v4/advertisers/{+advertiserId}/creatives/{+creativeId}", + "path": "v4/advertisers/{+advertiserId}/channels/{channelId}", "request": { - "$ref": "Creative" + "$ref": "Channel" }, "response": { - "$ref": "Creative" + "$ref": "Channel" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] } - } - }, - "insertionOrders": { - "methods": { - "create": { - "description": "Creates a new insertion order. Returns the newly created insertion order if successful.", - "flatPath": "v4/advertisers/{advertisersId}/insertionOrders", - "httpMethod": "POST", - "id": "displayvideo.advertisers.insertionOrders.create", - "parameterOrder": [ - "advertiserId" - ], - "parameters": { - "advertiserId": { - "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v4/advertisers/{+advertiserId}/insertionOrders", - "request": { - "$ref": "InsertionOrder" - }, - "response": { - "$ref": "InsertionOrder" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "delete": { - "description": "Deletes an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist. The insertion order should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", - "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", - "httpMethod": "DELETE", - "id": "displayvideo.advertisers.insertionOrders.delete", - "parameterOrder": [ - "advertiserId", - "insertionOrderId" - ], - "parameters": { - "advertiserId": { - "description": "The ID of the advertiser this insertion order belongs to.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" + }, + "resources": { + "sites": { + "methods": { + "bulkEdit": { + "description": "Bulk edits sites under a single channel. The operation will delete the sites provided in BulkEditSitesRequest.deleted_sites and then create the sites provided in BulkEditSitesRequest.created_sites.", + "flatPath": "v4/advertisers/{advertiserId}/channels/{channelsId}/sites:bulkEdit", + "httpMethod": "POST", + "id": "displayvideo.advertisers.channels.sites.bulkEdit", + "parameterOrder": [ + "advertiserId", + "channelId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel to which the sites belong.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit", + "request": { + "$ref": "BulkEditSitesRequest" + }, + "response": { + "$ref": "BulkEditSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] }, - "insertionOrderId": { - "description": "The ID of the insertion order to delete.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "get": { - "description": "Gets an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist.", - "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", - "httpMethod": "GET", - "id": "displayvideo.advertisers.insertionOrders.get", - "parameterOrder": [ - "advertiserId", - "insertionOrderId" - ], - "parameters": { - "advertiserId": { - "description": "Required. The ID of the advertiser this insertion order belongs to.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" + "create": { + "description": "Creates a site in a channel.", + "flatPath": "v4/advertisers/{advertiserId}/channels/{channelsId}/sites", + "httpMethod": "POST", + "id": "displayvideo.advertisers.channels.sites.create", + "parameterOrder": [ + "advertiserId", + "channelId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel in which the site will be created.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the parent channel.", + "format": "int64", + "location": "query", + "type": "string" + } + }, + "path": "v4/advertisers/{advertiserId}/channels/{+channelId}/sites", + "request": { + "$ref": "Site" + }, + "response": { + "$ref": "Site" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] }, - "insertionOrderId": { - "description": "Required. The ID of the insertion order to fetch.", - "format": "int64", - "location": "path", - "pattern": "^[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", - "response": { - "$ref": "InsertionOrder" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] - }, - "list": { - "description": "Lists insertion orders in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, insertion orders with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", - "flatPath": "v4/advertisers/{advertisersId}/insertionOrders", - "httpMethod": "GET", - "id": "displayvideo.advertisers.insertionOrders.list", + "delete": { + "description": "Deletes a site from a channel.", + "flatPath": "v4/advertisers/{advertiserId}/channels/{channelsId}/sites/{sitesId}", + "httpMethod": "DELETE", + "id": "displayvideo.advertisers.channels.sites.delete", + "parameterOrder": [ + "advertiserId", + "channelId", + "urlOrAppId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel to which the site belongs.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the parent channel.", + "format": "int64", + "location": "query", + "type": "string" + }, + "urlOrAppId": { + "description": "Required. The URL or app ID of the site to delete.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "list": { + "description": "Lists sites in a channel.", + "flatPath": "v4/advertisers/{advertisersId}/channels/{channelsId}/sites", + "httpMethod": "GET", + "id": "displayvideo.advertisers.channels.sites.list", + "parameterOrder": [ + "advertiserId", + "channelId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel to which the requested sites belong.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by site fields. Supported syntax: * Filter expressions for site retrieval can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID contains \"google\": `urlOrAppId : \"google\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `urlOrAppId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `urlOrAppId desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListSites` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the parent channel.", + "format": "int64", + "location": "query", + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/channels/{+channelId}/sites", + "response": { + "$ref": "ListSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "replace": { + "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", + "flatPath": "v4/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", + "httpMethod": "POST", + "id": "displayvideo.advertisers.channels.sites.replace", + "parameterOrder": [ + "advertiserId", + "channelId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel whose sites will be replaced.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{advertiserId}/channels/{+channelId}/sites:replace", + "request": { + "$ref": "ReplaceSitesRequest" + }, + "response": { + "$ref": "ReplaceSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + } + } + } + } + }, + "creatives": { + "methods": { + "create": { + "description": "Creates a new creative. Returns the newly created creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", + "flatPath": "v4/advertisers/{advertisersId}/creatives", + "httpMethod": "POST", + "id": "displayvideo.advertisers.creatives.create", "parameterOrder": [ "advertiserId" ], "parameters": { "advertiserId": { - "description": "Required. The ID of the advertiser to list insertion orders for.", + "description": "Output only. The unique ID of the advertiser the creative belongs to.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" - }, - "filter": { - "description": "Allows filtering by insertion order fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All insertion orders under a campaign: `campaignId=\"1234\"` * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders under an advertiser: `(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR entityStatus=\"ENTITY_STATUS_PAUSED\")` * All insertion orders with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003c=\"2020-11-04T18:54:47Z\"` * All insertion orders with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Field by which to sort the list. Acceptable values are: * \"displayName\" (default) * \"entityStatus\" * \"updateTime\" The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", - "location": "query", + } + }, + "path": "v4/advertisers/{+advertiserId}/creatives", + "request": { + "$ref": "Creative" + }, + "response": { + "$ref": "Creative" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "delete": { + "description": "Deletes a creative. Returns error code `NOT_FOUND` if the creative does not exist. The creative should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be deleted. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", + "flatPath": "v4/advertisers/{advertisersId}/creatives/{creativesId}", + "httpMethod": "DELETE", + "id": "displayvideo.advertisers.creatives.delete", + "parameterOrder": [ + "advertiserId", + "creativeId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser this creative belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, "type": "string" }, - "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInsertionOrders` method. If not specified, the first page of results will be returned.", - "location": "query", + "creativeId": { + "description": "The ID of the creative to be deleted.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, "type": "string" } }, - "path": "v4/advertisers/{+advertiserId}/insertionOrders", + "path": "v4/advertisers/{+advertiserId}/creatives/{+creativeId}", "response": { - "$ref": "ListInsertionOrdersResponse" + "$ref": "Empty" }, "scopes": [ "https://www.googleapis.com/auth/display-video" ] }, - "patch": { - "description": "Updates an existing insertion order. Returns the updated insertion order if successful.", - "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", - "httpMethod": "PATCH", - "id": "displayvideo.advertisers.insertionOrders.patch", + "get": { + "description": "Gets a creative.", + "flatPath": "v4/advertisers/{advertisersId}/creatives/{creativesId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.creatives.get", "parameterOrder": [ "advertiserId", - "insertionOrderId" + "creativeId" ], "parameters": { "advertiserId": { - "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", + "description": "Required. The ID of the advertiser this creative belongs to.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" }, - "insertionOrderId": { - "description": "Output only. The unique ID of the insertion order. Assigned by the system.", + "creativeId": { + "description": "Required. The ID of the creative to fetch.", "format": "int64", "location": "path", "pattern": "^[^/]+$", "required": true, "type": "string" - }, - "updateMask": { - "description": "Required. The mask to control which fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" } - }, - "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", - "request": { - "$ref": "InsertionOrder" - }, - "response": { - "$ref": "InsertionOrder" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video" - ] + }, + "path": "v4/advertisers/{+advertiserId}/creatives/{+creativeId}", + "response": { + "$ref": "Creative" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "list": { + "description": "Lists creatives in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, creatives with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", + "flatPath": "v4/advertisers/{advertisersId}/creatives", + "httpMethod": "GET", + "id": "displayvideo.advertisers.creatives.list", + "parameterOrder": [ + "advertiserId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser to list creatives for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by creative fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `lineItemIds` field must use the `HAS (:)` operator. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. * For `entityStatus`, `minDuration`, `maxDuration`, `updateTime`, and `dynamic` fields, there may be at most one restriction. Supported Fields: * `approvalStatus` * `creativeId` * `creativeType` * `dimensions` (input in the form of `{width}x{height}`) * `dynamic` * `entityStatus` * `exchangeReviewStatus` (input in the form of `{exchange}-{reviewStatus}`) * `lineItemIds` * `maxDuration` (input in the form of `{duration}s`. Only seconds are supported) * `minDuration` (input in the form of `{duration}s`. Only seconds are supported) * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative resource's field value reflects the last time that a creative has been updated, which includes updates made by the system (e.g. creative review updates). Examples: * All native creatives: `creativeType=\"CREATIVE_TYPE_NATIVE\"` * All active creatives with 300x400 or 50x100 dimensions: `entityStatus=\"ENTITY_STATUS_ACTIVE\" AND (dimensions=\"300x400\" OR dimensions=\"50x100\")` * All dynamic creatives that are approved by AdX or AppNexus, with a minimum duration of 5 seconds and 200ms: `dynamic=\"true\" AND minDuration=\"5.2s\" AND (exchangeReviewStatus=\"EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED\" OR exchangeReviewStatus=\"EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED\")` * All video creatives that are associated with line item ID 1 or 2: `creativeType=\"CREATIVE_TYPE_VIDEO\" AND (lineItemIds:1 OR lineItemIds:2)` * Find creatives by multiple creative IDs: `creativeId=1 OR creativeId=2` * All creatives with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `creativeId` (default) * `createTime` * `mediaDuration` * `dimensions` (sorts by width first, then by height) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `createTime desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCreatives` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/creatives", + "response": { + "$ref": "ListCreativesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "patch": { + "description": "Updates an existing creative. Returns the updated creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", + "flatPath": "v4/advertisers/{advertisersId}/creatives/{creativesId}", + "httpMethod": "PATCH", + "id": "displayvideo.advertisers.creatives.patch", + "parameterOrder": [ + "advertiserId", + "creativeId" + ], + "parameters": { + "advertiserId": { + "description": "Output only. The unique ID of the advertiser the creative belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "creativeId": { + "description": "Output only. The unique ID of the creative. Assigned by the system.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/creatives/{+creativeId}", + "request": { + "$ref": "Creative" + }, + "response": { + "$ref": "Creative" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + } + } + }, + "insertionOrders": { + "methods": { + "create": { + "description": "Creates a new insertion order. Returns the newly created insertion order if successful.", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders", + "httpMethod": "POST", + "id": "displayvideo.advertisers.insertionOrders.create", + "parameterOrder": [ + "advertiserId" + ], + "parameters": { + "advertiserId": { + "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders", + "request": { + "$ref": "InsertionOrder" + }, + "response": { + "$ref": "InsertionOrder" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "delete": { + "description": "Deletes an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist. The insertion order should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", + "httpMethod": "DELETE", + "id": "displayvideo.advertisers.insertionOrders.delete", + "parameterOrder": [ + "advertiserId", + "insertionOrderId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser this insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "The ID of the insertion order to delete.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "get": { + "description": "Gets an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist.", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.get", + "parameterOrder": [ + "advertiserId", + "insertionOrderId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser this insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order to fetch.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", + "response": { + "$ref": "InsertionOrder" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "list": { + "description": "Lists insertion orders in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, insertion orders with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.list", + "parameterOrder": [ + "advertiserId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser to list insertion orders for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by insertion order fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All insertion orders under a campaign: `campaignId=\"1234\"` * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders under an advertiser: `(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR entityStatus=\"ENTITY_STATUS_PAUSED\")` * All insertion orders with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003c=\"2020-11-04T18:54:47Z\"` * All insertion orders with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * \"displayName\" (default) * \"entityStatus\" * \"updateTime\" The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInsertionOrders` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders", + "response": { + "$ref": "ListInsertionOrdersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "listAssignedTargetingOptions": { + "description": "Lists assigned targeting options of an insertion order across targeting types.", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}:listAssignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.listAssignedTargetingOptions", + "parameterOrder": [ + "advertiserId", + "insertionOrderId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` resources of targeting type `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` or `TARGETING_TYPE_CHANNEL`: `targetingType=\"TARGETING_TYPE_PROXIMITY_LOCATION_LIST\" OR targetingType=\"TARGETING_TYPE_CHANNEL\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order to list assigned targeting options for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingType desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListInsertionOrderAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}:listAssignedTargetingOptions", + "response": { + "$ref": "BulkListInsertionOrderAssignedTargetingOptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "patch": { + "description": "Updates an existing insertion order. Returns the updated insertion order if successful.", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", + "httpMethod": "PATCH", + "id": "displayvideo.advertisers.insertionOrders.patch", + "parameterOrder": [ + "advertiserId", + "insertionOrderId" + ], + "parameters": { + "advertiserId": { + "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Output only. The unique ID of the insertion order. Assigned by the system.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", + "request": { + "$ref": "InsertionOrder" + }, + "response": { + "$ref": "InsertionOrder" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + } + }, + "resources": { + "targetingTypes": { + "resources": { + "assignedTargetingOptions": { + "methods": { + "create": { + "description": "Assigns a targeting option to an insertion order. Returns the assigned targeting option if successful. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", + "httpMethod": "POST", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order the assigned targeting option will belong to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION", + "TARGETING_TYPE_CONTENT_THEME_EXCLUSION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API.", + "Filter website content by content themes (for example, religion). Only supported for Advertiser resources. Targeting of this type cannot be created or updated using the API. This targeting is only inherited by child YouTube and Demand Gen line item resources." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions", + "request": { + "$ref": "AssignedTargetingOption" + }, + "response": { + "$ref": "AssignedTargetingOption" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "delete": { + "description": "Deletes an assigned targeting option from an insertion order. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + "httpMethod": "DELETE", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType", + "assignedTargetingOptionId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "assignedTargetingOptionId": { + "description": "Required. The ID of the assigned targeting option to delete.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order the assigned targeting option belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION", + "TARGETING_TYPE_CONTENT_THEME_EXCLUSION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API.", + "Filter website content by content themes (for example, religion). Only supported for Advertiser resources. Targeting of this type cannot be created or updated using the API. This targeting is only inherited by child YouTube and Demand Gen line item resources." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "get": { + "description": "Gets a single targeting option assigned to an insertion order.", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType", + "assignedTargetingOptionId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "assignedTargetingOptionId": { + "description": "Required. An identifier unique to the targeting type in this insertion order that identifies the assigned targeting option being requested.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order the assigned targeting option belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION", + "TARGETING_TYPE_CONTENT_THEME_EXCLUSION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API.", + "Filter website content by content themes (for example, religion). Only supported for Advertiser resources. Targeting of this type cannot be created or updated using the API. This targeting is only inherited by child YouTube and Demand Gen line item resources." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + "response": { + "$ref": "AssignedTargetingOption" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "list": { + "description": "Lists the targeting options assigned to an insertion order.", + "flatPath": "v4/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedTargetingOptionId` * `inheritance` Examples: * `AssignedTargetingOption` resources with ID 1 or 2: `assignedTargetingOptionId=\"1\" OR assignedTargetingOptionId=\"2\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", + "location": "query", + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order to list assigned targeting options for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `5000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInsertionOrderAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE", + "TARGETING_TYPE_YOUTUBE_VIDEO", + "TARGETING_TYPE_YOUTUBE_CHANNEL", + "TARGETING_TYPE_SESSION_POSITION", + "TARGETING_TYPE_CONTENT_THEME_EXCLUSION" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre.", + "Target ads to a specific YouTube video. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a specific YouTube channel. Targeting of this type cannot be created or updated using the API. Although this targeting is inherited by child resources, **inherited targeting of this type will not be retrieveable**.", + "Target ads to a serve it in a certain position of a session. Only supported for Ad Group resources under YouTube Programmatic Reservation line items. Targeting of this type cannot be created or updated using the API.", + "Filter website content by content themes (for example, religion). Only supported for Advertiser resources. Targeting of this type cannot be created or updated using the API. This targeting is only inherited by child YouTube and Demand Gen line item resources." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions", + "response": { + "$ref": "ListInsertionOrderAssignedTargetingOptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + } + } + } + } } } }, @@ -8219,7 +9302,7 @@ } } }, - "revision": "20250709", + "revision": "20250729", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -11020,6 +12103,40 @@ }, "type": "object" }, + "BulkListCampaignAssignedTargetingOptionsResponse": { + "id": "BulkListCampaignAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent BulkListCampaignAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, + "BulkListInsertionOrderAssignedTargetingOptionsResponse": { + "id": "BulkListInsertionOrderAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent BulkListInsertionOrderAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, "BulkUpdateLineItemsRequest": { "description": "Request message for LineItemService.BulkUpdateLineItems.", "id": "BulkUpdateLineItemsRequest", @@ -12440,7 +13557,7 @@ true, true, true, - false, + true, false, false, false, @@ -18090,6 +19207,24 @@ }, "type": "object" }, + "ListCampaignAssignedTargetingOptionsResponse": { + "description": "Response message for ListCampaignAssignedTargetingOptions.", + "id": "ListCampaignAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent ListCampaignAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, "ListCampaignsResponse": { "id": "ListCampaignsResponse", "properties": { @@ -18294,6 +19429,23 @@ }, "type": "object" }, + "ListInsertionOrderAssignedTargetingOptionsResponse": { + "id": "ListInsertionOrderAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent ListInsertionOrderAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, "ListInsertionOrdersResponse": { "id": "ListInsertionOrdersResponse", "properties": { @@ -20200,7 +21352,7 @@ true, true, true, - false, + true, false, false, false, @@ -20286,7 +21438,7 @@ true, true, true, - false, + true, false, false, false, diff --git a/displayvideo/v4/displayvideo-gen.go b/displayvideo/v4/displayvideo-gen.go index b646692071..d81a66fef6 100644 --- a/displayvideo/v4/displayvideo-gen.go +++ b/displayvideo/v4/displayvideo-gen.go @@ -316,11 +316,35 @@ type AdvertisersAssetsService struct { func NewAdvertisersCampaignsService(s *Service) *AdvertisersCampaignsService { rs := &AdvertisersCampaignsService{s: s} + rs.TargetingTypes = NewAdvertisersCampaignsTargetingTypesService(s) return rs } type AdvertisersCampaignsService struct { s *Service + + TargetingTypes *AdvertisersCampaignsTargetingTypesService +} + +func NewAdvertisersCampaignsTargetingTypesService(s *Service) *AdvertisersCampaignsTargetingTypesService { + rs := &AdvertisersCampaignsTargetingTypesService{s: s} + rs.AssignedTargetingOptions = NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s) + return rs +} + +type AdvertisersCampaignsTargetingTypesService struct { + s *Service + + AssignedTargetingOptions *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService +} + +func NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService { + rs := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService{s: s} + return rs +} + +type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService struct { + s *Service } func NewAdvertisersChannelsService(s *Service) *AdvertisersChannelsService { @@ -355,11 +379,35 @@ type AdvertisersCreativesService struct { func NewAdvertisersInsertionOrdersService(s *Service) *AdvertisersInsertionOrdersService { rs := &AdvertisersInsertionOrdersService{s: s} + rs.TargetingTypes = NewAdvertisersInsertionOrdersTargetingTypesService(s) return rs } type AdvertisersInsertionOrdersService struct { s *Service + + TargetingTypes *AdvertisersInsertionOrdersTargetingTypesService +} + +func NewAdvertisersInsertionOrdersTargetingTypesService(s *Service) *AdvertisersInsertionOrdersTargetingTypesService { + rs := &AdvertisersInsertionOrdersTargetingTypesService{s: s} + rs.AssignedTargetingOptions = NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s) + return rs +} + +type AdvertisersInsertionOrdersTargetingTypesService struct { + s *Service + + AssignedTargetingOptions *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService +} + +func NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService { + rs := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService{s: s} + return rs +} + +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService struct { + s *Service } func NewAdvertisersInvoicesService(s *Service) *AdvertisersInvoicesService { @@ -4060,6 +4108,68 @@ func (s BulkListAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BulkListCampaignAssignedTargetingOptionsResponse struct { + // AssignedTargetingOptions: The list of assigned targeting options. This list + // will be absent if empty. + AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` + // NextPageToken: A token identifying the next page of results. This value + // should be specified as the pageToken in a subsequent + // BulkListCampaignAssignedTargetingOptionsRequest to fetch the next page of + // results. This token will be absent if there are no more + // assigned_targeting_options to return. + 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. "AssignedTargetingOptions") + // 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. "AssignedTargetingOptions") 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 BulkListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod BulkListCampaignAssignedTargetingOptionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type BulkListInsertionOrderAssignedTargetingOptionsResponse struct { + // AssignedTargetingOptions: The list of assigned targeting options. This list + // will be absent if empty. + AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` + // NextPageToken: A token identifying the next page of results. This value + // should be specified as the pageToken in a subsequent + // BulkListInsertionOrderAssignedTargetingOptionsRequest to fetch the next page + // of results. This token will be absent if there are no more + // assigned_targeting_options to return. + 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. "AssignedTargetingOptions") + // 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. "AssignedTargetingOptions") 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 BulkListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod BulkListInsertionOrderAssignedTargetingOptionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BulkUpdateLineItemsRequest: Request message for // LineItemService.BulkUpdateLineItems. type BulkUpdateLineItemsRequest struct { @@ -11484,6 +11594,39 @@ func (s ListAssignedLocationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListCampaignAssignedTargetingOptionsResponse: Response message for +// ListCampaignAssignedTargetingOptions. +type ListCampaignAssignedTargetingOptionsResponse struct { + // AssignedTargetingOptions: The list of assigned targeting options. This list + // will be absent if empty. + AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` + // NextPageToken: A token identifying the next page of results. This value + // should be specified as the pageToken in a subsequent + // ListCampaignAssignedTargetingOptionsRequest to fetch the next page of + // results. This token will be absent if there are no more + // assigned_targeting_options to return. + 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. "AssignedTargetingOptions") + // 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. "AssignedTargetingOptions") 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 ListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListCampaignAssignedTargetingOptionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ListCampaignsResponse struct { // Campaigns: The list of campaigns. This list will be absent if empty. Campaigns []*Campaign `json:"campaigns,omitempty"` @@ -11834,6 +11977,37 @@ func (s ListGuaranteedOrdersResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type ListInsertionOrderAssignedTargetingOptionsResponse struct { + // AssignedTargetingOptions: The list of assigned targeting options. This list + // will be absent if empty. + AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` + // NextPageToken: A token identifying the next page of results. This value + // should be specified as the pageToken in a subsequent + // ListInsertionOrderAssignedTargetingOptionsRequest to fetch the next page of + // results. This token will be absent if there are no more + // assigned_targeting_options to return. + 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. "AssignedTargetingOptions") + // 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. "AssignedTargetingOptions") 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 ListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInsertionOrderAssignedTargetingOptionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ListInsertionOrdersResponse struct { // InsertionOrders: The list of insertion orders. This list will be absent if // empty. @@ -19112,72 +19286,116 @@ func (c *AdvertisersCampaignsListCall) Pages(ctx context.Context, f func(*ListCa } } -type AdvertisersCampaignsPatchCall struct { +type AdvertisersCampaignsListAssignedTargetingOptionsCall struct { s *Service advertiserId int64 campaignId int64 - campaign *Campaign urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Patch: Updates an existing campaign. Returns the updated campaign if -// successful. +// ListAssignedTargetingOptions: Lists assigned targeting options of a campaign +// across targeting types. // -// - advertiserId: Output only. The unique ID of the advertiser the campaign -// belongs to. -// - campaignId: Output only. The unique ID of the campaign. Assigned by the -// system. -func (r *AdvertisersCampaignsService) Patch(advertiserId int64, campaignId int64, campaign *Campaign) *AdvertisersCampaignsPatchCall { - c := &AdvertisersCampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the campaign belongs to. +// - campaignId: The ID of the campaign to list assigned targeting options for. +func (r *AdvertisersCampaignsService) ListAssignedTargetingOptions(advertiserId int64, campaignId int64) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c := &AdvertisersCampaignsListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.campaignId = campaignId - c.campaign = campaign return c } -// UpdateMask sets the optional parameter "updateMask": Required. The mask to -// control which fields to update. -func (c *AdvertisersCampaignsPatchCall) UpdateMask(updateMask string) *AdvertisersCampaignsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Filter sets the optional parameter "filter": Allows filtering by assigned +// targeting option fields. Supported syntax: * Filter expressions are made up +// of one or more restrictions. * Restrictions can be combined by the `OR` +// logical operator. * A restriction has the form of `{field} {operator} +// {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: +// * `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` +// resources of targeting type `TARGETING_TYPE_LANGUAGE` or +// `TARGETING_TYPE_GENDER`: `targetingType="TARGETING_TYPE_LANGUAGE" OR +// targetingType="TARGETING_TYPE_GENDER" * `AssignedTargetingOption` resources +// with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: +// `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER" The +// length of this field should be no more than 500 characters. Reference our +// filter `LIST` requests (/display-video/api/guides/how-tos/filters) guide for +// more information. +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * `targetingType` (default) The default sorting +// order is ascending. To specify descending order for a field, a suffix "desc" +// should be added to the field name. Example: `targetingType desc`. +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// size must be an integer between `1` and `5000`. If unspecified, the default +// is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is +// specified. +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token that lets the +// client fetch the next page of results. Typically, this is the value of +// next_page_token returned from the previous call to +// `BulkListCampaignAssignedTargetingOptions` method. If not specified, the +// first page of results will be returned. +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + 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 *AdvertisersCampaignsPatchCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsPatchCall { +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsListAssignedTargetingOptionsCall { 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 *AdvertisersCampaignsListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsListAssignedTargetingOptionsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCampaignsPatchCall) Context(ctx context.Context) *AdvertisersCampaignsPatchCall { +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersCampaignsListAssignedTargetingOptionsCall { 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 *AdvertisersCampaignsPatchCall) Header() http.Header { +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.campaign) - if err != nil { - return nil, err +func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}:listAssignedTargetingOptions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -19186,16 +19404,17 @@ func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, e "advertiserId": strconv.FormatInt(c.advertiserId, 10), "campaignId": strconv.FormatInt(c.campaignId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.listAssignedTargetingOptions", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.campaigns.patch" call. +// Do executes the "displayvideo.advertisers.campaigns.listAssignedTargetingOptions" call. // Any non-2xx status code is an error. Response headers are in either -// *Campaign.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 *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { +// *BulkListCampaignAssignedTargetingOptionsResponse.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 *AdvertisersCampaignsListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListCampaignAssignedTargetingOptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19214,7 +19433,7 @@ func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Campaign{ + ret := &BulkListCampaignAssignedTargetingOptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19225,88 +19444,115 @@ func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campa if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.listAssignedTargetingOptions", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsCreateCall struct { +// 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 *AdvertisersCampaignsListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListCampaignAssignedTargetingOptionsResponse) 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 AdvertisersCampaignsPatchCall struct { s *Service advertiserId int64 - channel *Channel + campaignId int64 + campaign *Campaign urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a new channel. Returns the newly created channel if +// Patch: Updates an existing campaign. Returns the updated campaign if // successful. // -// - advertiserId: The ID of the advertiser that owns the created channel. -func (r *AdvertisersChannelsService) Create(advertiserId int64, channel *Channel) *AdvertisersChannelsCreateCall { - c := &AdvertisersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: Output only. The unique ID of the advertiser the campaign +// belongs to. +// - campaignId: Output only. The unique ID of the campaign. Assigned by the +// system. +func (r *AdvertisersCampaignsService) Patch(advertiserId int64, campaignId int64, campaign *Campaign) *AdvertisersCampaignsPatchCall { + c := &AdvertisersCampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.channel = channel + c.campaignId = campaignId + c.campaign = campaign return c } -// PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the created channel. -func (c *AdvertisersChannelsCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsCreateCall { - c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) +// UpdateMask sets the optional parameter "updateMask": Required. The mask to +// control which fields to update. +func (c *AdvertisersCampaignsPatchCall) UpdateMask(updateMask string) *AdvertisersCampaignsPatchCall { + 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 *AdvertisersChannelsCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsCreateCall { +func (c *AdvertisersCampaignsPatchCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsCreateCall) Context(ctx context.Context) *AdvertisersChannelsCreateCall { +func (c *AdvertisersCampaignsPatchCall) Context(ctx context.Context) *AdvertisersCampaignsPatchCall { 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 *AdvertisersChannelsCreateCall) Header() http.Header { +func (c *AdvertisersCampaignsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.channel) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.campaign) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "campaignId": strconv.FormatInt(c.campaignId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.create" call. +// Do executes the "displayvideo.advertisers.campaigns.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Channel.ServerResponse.Header or (if a response was returned at all) in +// *Campaign.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 *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) { +func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19325,7 +19571,7 @@ func (c *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Chann if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Channel{ + ret := &Campaign{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19336,42 +19582,57 @@ func (c *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Chann if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsGetCall struct { - s *Service - advertiserId int64 - channelId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall struct { + s *Service + advertiserId int64 + campaignId int64 + targetingType string + assignedTargetingOptionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Gets a channel for a partner or advertiser. +// Get: Gets a single targeting option assigned to a campaign. // -// - advertiserId: The ID of the advertiser that owns the fetched channel. -// - channelId: The ID of the channel to fetch. -func (r *AdvertisersChannelsService) Get(advertiserId int64, channelId int64) *AdvertisersChannelsGetCall { - c := &AdvertisersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the campaign belongs to. +// - assignedTargetingOptionId: An identifier unique to the targeting type in +// this campaign that identifies the assigned targeting option being +// requested. +// - campaignId: The ID of the campaign the assigned targeting option belongs +// to. +// - targetingType: Identifies the type of this assigned targeting option. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * +// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * +// `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * +// `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * +// `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, campaignId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { + c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.channelId = channelId - return c -} - -// PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the fetched channel. -func (c *AdvertisersChannelsGetCall) PartnerId(partnerId int64) *AdvertisersChannelsGetCall { - c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) + c.campaignId = campaignId + c.targetingType = targetingType + c.assignedTargetingOptionId = assignedTargetingOptionId 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 *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersChannelsGetCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19379,34 +19640,34 @@ func (c *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersCh // 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 *AdvertisersChannelsGetCall) IfNoneMatch(entityTag string) *AdvertisersChannelsGetCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsGetCall) Context(ctx context.Context) *AdvertisersChannelsGetCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { 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 *AdvertisersChannelsGetCall) Header() http.Header { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels/{+channelId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -19414,19 +19675,22 @@ func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "channelId": strconv.FormatInt(c.channelId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "campaignId": strconv.FormatInt(c.campaignId, 10), + "targetingType": c.targetingType, + "assignedTargetingOptionId": c.assignedTargetingOptionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.get" call. +// Do executes the "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Channel.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 *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) { +// *AssignedTargetingOption.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 *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19445,7 +19709,7 @@ func (c *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Channel{ + ret := &AssignedTargetingOption{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19456,79 +19720,98 @@ func (c *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsListCall struct { - s *Service - advertiserId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall struct { + s *Service + advertiserId int64 + campaignId int64 + targetingType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Lists channels for a partner or advertiser. +// List: Lists the targeting options assigned to a campaign for a specified +// targeting type. // -// - advertiserId: The ID of the advertiser that owns the channels. -func (r *AdvertisersChannelsService) List(advertiserId int64) *AdvertisersChannelsListCall { - c := &AdvertisersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the campaign belongs to. +// - campaignId: The ID of the campaign to list assigned targeting options for. +// - targetingType: Identifies the type of assigned targeting options to list. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * +// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * +// `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * +// `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * +// `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, campaignId int64, targetingType string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { + c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId + c.campaignId = campaignId + c.targetingType = targetingType return c } -// Filter sets the optional parameter "filter": Allows filtering by channel -// fields. Supported syntax: * Filter expressions for channel can only contain -// at most one restriction. * A restriction has the form of `{field} {operator} -// {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * -// `displayName` Examples: * All channels for which the display name contains -// "google": `displayName : "google". The length of this field should be no +// Filter sets the optional parameter "filter": Allows filtering by assigned +// targeting option fields. Supported syntax: * Filter expressions are made up +// of one or more restrictions. * Restrictions can be combined by the `OR` +// logical operator. * A restriction has the form of `{field} {operator} +// {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: +// * `assignedTargetingOptionId` * `inheritance` Examples: * +// `AssignedTargetingOption` resources with ID 1 or 2 +// `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" * +// `AssignedTargetingOption` resources with inheritance status of +// `NOT_INHERITED` or `INHERITED_FROM_PARTNER` `inheritance="NOT_INHERITED" OR +// inheritance="INHERITED_FROM_PARTNER" The length of this field should be no // more than 500 characters. Reference our filter `LIST` requests // (/display-video/api/guides/how-tos/filters) guide for more information. -func (c *AdvertisersChannelsListCall) Filter(filter string) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Field by which to sort the -// list. Acceptable values are: * `displayName` (default) * `channelId` The +// list. Acceptable values are: * `assignedTargetingOptionId` (default) The // default sorting order is ascending. To specify descending order for a field, -// a suffix " desc" should be added to the field name. Example: `displayName -// desc`. -func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChannelsListCall { +// a suffix "desc" should be added to the field name. Example: +// `assignedTargetingOptionId desc`. +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `200`. If unspecified will default to `100`. Returns +// be between `1` and `5000`. If unspecified will default to `100`. Returns // error code `INVALID_ARGUMENT` if an invalid value is specified. -func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 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. Typically, this is the value of -// next_page_token returned from the previous call to `ListChannels` method. If -// not specified, the first page of results will be returned. -func (c *AdvertisersChannelsListCall) PageToken(pageToken string) *AdvertisersChannelsListCall { +// next_page_token returned from the previous call to +// `ListCampaignAssignedTargetingOptions` method. If not specified, the first +// page of results will be returned. +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the channels. -func (c *AdvertisersChannelsListCall) PartnerId(partnerId int64) *AdvertisersChannelsListCall { - c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) - 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 *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19536,34 +19819,34 @@ func (c *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersC // 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 *AdvertisersChannelsListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsListCall) Context(ctx context.Context) *AdvertisersChannelsListCall { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 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 *AdvertisersChannelsListCall) Header() http.Header { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -19571,19 +19854,21 @@ func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "campaignId": strconv.FormatInt(c.campaignId, 10), + "targetingType": c.targetingType, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.list" call. +// Do executes the "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListChannelsResponse.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 *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) { +// *ListCampaignAssignedTargetingOptionsResponse.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 *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListCampaignAssignedTargetingOptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19602,7 +19887,7 @@ func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListCha if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListChannelsResponse{ + ret := &ListCampaignAssignedTargetingOptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19613,14 +19898,14 @@ func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListCha if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list", "response", internallog.HTTPResponse(res, b)) 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 *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error { +func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListCampaignAssignedTargetingOptionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -19638,67 +19923,57 @@ func (c *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListCha } } -type AdvertisersChannelsPatchCall struct { +type AdvertisersChannelsCreateCall struct { s *Service advertiserId int64 - channelId int64 channel *Channel urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a channel. Returns the updated channel if successful. +// Create: Creates a new channel. Returns the newly created channel if +// successful. // -// - advertiserId: The ID of the advertiser that owns the created channel. -// - channelId: Output only. The unique ID of the channel. Assigned by the -// system. -func (r *AdvertisersChannelsService) Patch(advertiserId int64, channelId int64, channel *Channel) *AdvertisersChannelsPatchCall { - c := &AdvertisersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the created channel. +func (r *AdvertisersChannelsService) Create(advertiserId int64, channel *Channel) *AdvertisersChannelsCreateCall { + c := &AdvertisersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.channelId = channelId c.channel = channel return c } // PartnerId sets the optional parameter "partnerId": The ID of the partner // that owns the created channel. -func (c *AdvertisersChannelsPatchCall) PartnerId(partnerId int64) *AdvertisersChannelsPatchCall { +func (c *AdvertisersChannelsCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsCreateCall { c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) return c } -// UpdateMask sets the optional parameter "updateMask": Required. The mask to -// control which fields to update. -func (c *AdvertisersChannelsPatchCall) UpdateMask(updateMask string) *AdvertisersChannelsPatchCall { - 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 *AdvertisersChannelsPatchCall) Fields(s ...googleapi.Field) *AdvertisersChannelsPatchCall { +func (c *AdvertisersChannelsCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsPatchCall) Context(ctx context.Context) *AdvertisersChannelsPatchCall { +func (c *AdvertisersChannelsCreateCall) Context(ctx context.Context) *AdvertisersChannelsCreateCall { 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 *AdvertisersChannelsPatchCall) Header() http.Header { +func (c *AdvertisersChannelsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersChannelsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.channel) if err != nil { @@ -19706,27 +19981,26 @@ func (c *AdvertisersChannelsPatchCall) doRequest(alt string) (*http.Response, er } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels/{channelId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.patch" call. +// Do executes the "displayvideo.advertisers.channels.create" call. // Any non-2xx status code is an error. Response headers are in either // *Channel.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 *AdvertisersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { +func (c *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19756,68 +20030,79 @@ func (c *AdvertisersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channe if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsSitesBulkEditCall struct { - s *Service - advertiserId int64 - channelId int64 - bulkeditsitesrequest *BulkEditSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersChannelsGetCall struct { + s *Service + advertiserId int64 + channelId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// BulkEdit: Bulk edits sites under a single channel. The operation will delete -// the sites provided in BulkEditSitesRequest.deleted_sites and then create the -// sites provided in BulkEditSitesRequest.created_sites. +// Get: Gets a channel for a partner or advertiser. // -// - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel to which the sites belong. -func (r *AdvertisersChannelsSitesService) BulkEdit(advertiserId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *AdvertisersChannelsSitesBulkEditCall { - c := &AdvertisersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the fetched channel. +// - channelId: The ID of the channel to fetch. +func (r *AdvertisersChannelsService) Get(advertiserId int64, channelId int64) *AdvertisersChannelsGetCall { + c := &AdvertisersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.channelId = channelId - c.bulkeditsitesrequest = bulkeditsitesrequest + return c +} + +// PartnerId sets the optional parameter "partnerId": The ID of the partner +// that owns the fetched channel. +func (c *AdvertisersChannelsGetCall) PartnerId(partnerId int64) *AdvertisersChannelsGetCall { + c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 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 *AdvertisersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesBulkEditCall { +func (c *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersChannelsGetCall { 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 *AdvertisersChannelsGetCall) IfNoneMatch(entityTag string) *AdvertisersChannelsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesBulkEditCall) Context(ctx context.Context) *AdvertisersChannelsSitesBulkEditCall { +func (c *AdvertisersChannelsGetCall) Context(ctx context.Context) *AdvertisersChannelsGetCall { 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 *AdvertisersChannelsSitesBulkEditCall) Header() http.Header { +func (c *AdvertisersChannelsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkeditsitesrequest) - if err != nil { - return nil, err +func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels/{+channelId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -19826,17 +20111,16 @@ func (c *AdvertisersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Resp "advertiserId": strconv.FormatInt(c.advertiserId, 10), "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.bulkEdit", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.bulkEdit" call. +// Do executes the "displayvideo.advertisers.channels.get" call. // Any non-2xx status code is an error. Response headers are in either -// *BulkEditSitesResponse.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 *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) { +// *Channel.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 *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19855,7 +20139,7 @@ func (c *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BulkEditSitesResponse{ + ret := &Channel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19866,35 +20150,71 @@ func (c *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.bulkEdit", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsSitesCreateCall struct { +type AdvertisersChannelsListCall struct { s *Service advertiserId int64 - channelId int64 - site *Site urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Create: Creates a site in a channel. +// List: Lists channels for a partner or advertiser. // -// - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel in which the site will be created. -func (r *AdvertisersChannelsSitesService) Create(advertiserId int64, channelId int64, site *Site) *AdvertisersChannelsSitesCreateCall { - c := &AdvertisersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the channels. +func (r *AdvertisersChannelsService) List(advertiserId int64) *AdvertisersChannelsListCall { + c := &AdvertisersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.channelId = channelId - c.site = site + return c +} + +// Filter sets the optional parameter "filter": Allows filtering by channel +// fields. Supported syntax: * Filter expressions for channel can only contain +// at most one restriction. * A restriction has the form of `{field} {operator} +// {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * +// `displayName` Examples: * All channels for which the display name contains +// "google": `displayName : "google". The length of this field should be no +// more than 500 characters. Reference our filter `LIST` requests +// (/display-video/api/guides/how-tos/filters) guide for more information. +func (c *AdvertisersChannelsListCall) Filter(filter string) *AdvertisersChannelsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * `displayName` (default) * `channelId` The +// default sorting order is ascending. To specify descending order for a field, +// a suffix " desc" should be added to the field name. Example: `displayName +// desc`. +func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChannelsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Must +// be between `1` and `200`. If unspecified will default to `100`. Returns +// error code `INVALID_ARGUMENT` if an invalid value is specified. +func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall { + 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. Typically, this is the value of +// next_page_token returned from the previous call to `ListChannels` method. If +// not specified, the first page of results will be returned. +func (c *AdvertisersChannelsListCall) PageToken(pageToken string) *AdvertisersChannelsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the parent channel. -func (c *AdvertisersChannelsSitesCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesCreateCall { +// that owns the channels. +func (c *AdvertisersChannelsListCall) PartnerId(partnerId int64) *AdvertisersChannelsListCall { c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) return c } @@ -19902,55 +20222,62 @@ func (c *AdvertisersChannelsSitesCreateCall) PartnerId(partnerId int64) *Adverti // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AdvertisersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesCreateCall { +func (c *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsListCall { 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 *AdvertisersChannelsListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesCreateCall) Context(ctx context.Context) *AdvertisersChannelsSitesCreateCall { +func (c *AdvertisersChannelsListCall) Context(ctx context.Context) *AdvertisersChannelsListCall { 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 *AdvertisersChannelsSitesCreateCall) Header() http.Header { +func (c *AdvertisersChannelsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.site) - if err != nil { - return nil, err +func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{advertiserId}/channels/{+channelId}/sites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.create" call. +// Do executes the "displayvideo.advertisers.channels.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Site.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 *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) { +// *ListChannelsResponse.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 *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19969,7 +20296,7 @@ func (c *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Site{ + ret := &ListChannelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19980,70 +20307,102 @@ func (c *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsSitesDeleteCall struct { +// 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 *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) 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 AdvertisersChannelsPatchCall struct { s *Service advertiserId int64 channelId int64 - urlOrAppId string + channel *Channel urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a site from a channel. +// Patch: Updates a channel. Returns the updated channel if successful. // -// - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel to which the site belongs. -// - urlOrAppId: The URL or app ID of the site to delete. -func (r *AdvertisersChannelsSitesService) Delete(advertiserId int64, channelId int64, urlOrAppId string) *AdvertisersChannelsSitesDeleteCall { - c := &AdvertisersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the created channel. +// - channelId: Output only. The unique ID of the channel. Assigned by the +// system. +func (r *AdvertisersChannelsService) Patch(advertiserId int64, channelId int64, channel *Channel) *AdvertisersChannelsPatchCall { + c := &AdvertisersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.channelId = channelId - c.urlOrAppId = urlOrAppId + c.channel = channel return c } // PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the parent channel. -func (c *AdvertisersChannelsSitesDeleteCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesDeleteCall { +// that owns the created channel. +func (c *AdvertisersChannelsPatchCall) PartnerId(partnerId int64) *AdvertisersChannelsPatchCall { c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) return c } +// UpdateMask sets the optional parameter "updateMask": Required. The mask to +// control which fields to update. +func (c *AdvertisersChannelsPatchCall) UpdateMask(updateMask string) *AdvertisersChannelsPatchCall { + 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 *AdvertisersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesDeleteCall { +func (c *AdvertisersChannelsPatchCall) Fields(s ...googleapi.Field) *AdvertisersChannelsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesDeleteCall) Context(ctx context.Context) *AdvertisersChannelsSitesDeleteCall { +func (c *AdvertisersChannelsPatchCall) Context(ctx context.Context) *AdvertisersChannelsPatchCall { 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 *AdvertisersChannelsSitesDeleteCall) Header() http.Header { +func (c *AdvertisersChannelsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *AdvertisersChannelsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.channel) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels/{channelId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -20051,18 +20410,17 @@ func (c *AdvertisersChannelsSitesDeleteCall) doRequest(alt string) (*http.Respon googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), "channelId": strconv.FormatInt(c.channelId, 10), - "urlOrAppId": c.urlOrAppId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.delete" call. +// Do executes the "displayvideo.advertisers.channels.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in +// *Channel.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 *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *AdvertisersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20081,7 +20439,7 @@ func (c *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Channel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20092,119 +20450,68 @@ func (c *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersChannelsSitesListCall struct { - s *Service - advertiserId int64 - channelId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists sites in a channel. +type AdvertisersChannelsSitesBulkEditCall struct { + s *Service + advertiserId int64 + channelId int64 + bulkeditsitesrequest *BulkEditSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BulkEdit: Bulk edits sites under a single channel. The operation will delete +// the sites provided in BulkEditSitesRequest.deleted_sites and then create the +// sites provided in BulkEditSitesRequest.created_sites. // -// - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel to which the requested sites -// belong. -func (r *AdvertisersChannelsSitesService) List(advertiserId int64, channelId int64) *AdvertisersChannelsSitesListCall { - c := &AdvertisersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the parent channel. +// - channelId: The ID of the parent channel to which the sites belong. +func (r *AdvertisersChannelsSitesService) BulkEdit(advertiserId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *AdvertisersChannelsSitesBulkEditCall { + c := &AdvertisersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.channelId = channelId - return c -} - -// Filter sets the optional parameter "filter": Allows filtering by site -// fields. Supported syntax: * Filter expressions for site retrieval can only -// contain at most one restriction. * A restriction has the form of `{field} -// {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported -// fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID -// contains "google": `urlOrAppId : "google" The length of this field should -// be no more than 500 characters. Reference our filter `LIST` requests -// (/display-video/api/guides/how-tos/filters) guide for more information. -func (c *AdvertisersChannelsSitesListCall) Filter(filter string) *AdvertisersChannelsSitesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Field by which to sort the -// list. Acceptable values are: * `urlOrAppId` (default) The default sorting -// order is ascending. To specify descending order for a field, a suffix " -// desc" should be added to the field name. Example: `urlOrAppId desc`. -func (c *AdvertisersChannelsSitesListCall) OrderBy(orderBy string) *AdvertisersChannelsSitesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `10000`. If unspecified will default to `100`. Returns -// error code `INVALID_ARGUMENT` if an invalid value is specified. -func (c *AdvertisersChannelsSitesListCall) PageSize(pageSize int64) *AdvertisersChannelsSitesListCall { - 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. Typically, this is the value of -// next_page_token returned from the previous call to `ListSites` method. If -// not specified, the first page of results will be returned. -func (c *AdvertisersChannelsSitesListCall) PageToken(pageToken string) *AdvertisersChannelsSitesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// PartnerId sets the optional parameter "partnerId": The ID of the partner -// that owns the parent channel. -func (c *AdvertisersChannelsSitesListCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesListCall { - c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) + c.bulkeditsitesrequest = bulkeditsitesrequest 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 *AdvertisersChannelsSitesListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesListCall { +func (c *AdvertisersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesBulkEditCall { 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 *AdvertisersChannelsSitesListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsSitesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesListCall) Context(ctx context.Context) *AdvertisersChannelsSitesListCall { +func (c *AdvertisersChannelsSitesBulkEditCall) Context(ctx context.Context) *AdvertisersChannelsSitesBulkEditCall { 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 *AdvertisersChannelsSitesListCall) Header() http.Header { +func (c *AdvertisersChannelsSitesBulkEditCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesListCall) 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 *AdvertisersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkeditsitesrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels/{+channelId}/sites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -20213,17 +20520,17 @@ func (c *AdvertisersChannelsSitesListCall) doRequest(alt string) (*http.Response "advertiserId": strconv.FormatInt(c.advertiserId, 10), "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.bulkEdit", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.list" call. +// Do executes the "displayvideo.advertisers.channels.sites.bulkEdit" call. // Any non-2xx status code is an error. Response headers are in either -// *ListSitesResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *BulkEditSitesResponse.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 *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, error) { +func (c *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20242,7 +20549,7 @@ func (c *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*Li if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSitesResponse{ + ret := &BulkEditSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20253,90 +20560,71 @@ func (c *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*Li if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.bulkEdit", "response", internallog.HTTPResponse(res, b)) 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 *AdvertisersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) 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 AdvertisersChannelsSitesReplaceCall struct { - s *Service - advertiserId int64 - channelId int64 - replacesitesrequest *ReplaceSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersChannelsSitesCreateCall struct { + s *Service + advertiserId int64 + channelId int64 + site *Site + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Replace: Replaces all of the sites under a single channel. The operation -// will replace the sites under a channel with the sites provided in -// ReplaceSitesRequest.new_sites. **This method regularly experiences high -// latency.** We recommend increasing your default timeout -// (/display-video/api/guides/best-practices/timeouts#client_library_timeout) -// to avoid errors. +// Create: Creates a site in a channel. // // - advertiserId: The ID of the advertiser that owns the parent channel. -// - channelId: The ID of the parent channel whose sites will be replaced. -func (r *AdvertisersChannelsSitesService) Replace(advertiserId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *AdvertisersChannelsSitesReplaceCall { - c := &AdvertisersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - channelId: The ID of the parent channel in which the site will be created. +func (r *AdvertisersChannelsSitesService) Create(advertiserId int64, channelId int64, site *Site) *AdvertisersChannelsSitesCreateCall { + c := &AdvertisersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.channelId = channelId - c.replacesitesrequest = replacesitesrequest + c.site = site + return c +} + +// PartnerId sets the optional parameter "partnerId": The ID of the partner +// that owns the parent channel. +func (c *AdvertisersChannelsSitesCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesCreateCall { + c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 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 *AdvertisersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesReplaceCall { +func (c *AdvertisersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersChannelsSitesReplaceCall) Context(ctx context.Context) *AdvertisersChannelsSitesReplaceCall { +func (c *AdvertisersChannelsSitesCreateCall) Context(ctx context.Context) *AdvertisersChannelsSitesCreateCall { 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 *AdvertisersChannelsSitesReplaceCall) Header() http.Header { +func (c *AdvertisersChannelsSitesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.replacesitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.site) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{advertiserId}/channels/{+channelId}/sites:replace") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{advertiserId}/channels/{+channelId}/sites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20347,17 +20635,16 @@ func (c *AdvertisersChannelsSitesReplaceCall) doRequest(alt string) (*http.Respo "advertiserId": strconv.FormatInt(c.advertiserId, 10), "channelId": strconv.FormatInt(c.channelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.replace", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.channels.sites.replace" call. +// Do executes the "displayvideo.advertisers.channels.sites.create" call. // Any non-2xx status code is an error. Response headers are in either -// *ReplaceSitesResponse.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 *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, error) { +// *Site.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 *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20376,7 +20663,7 @@ func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReplaceSitesResponse{ + ret := &Site{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20387,84 +20674,89 @@ func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.replace", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersCreativesCreateCall struct { +type AdvertisersChannelsSitesDeleteCall struct { s *Service advertiserId int64 - creative *Creative + channelId int64 + urlOrAppId string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a new creative. Returns the newly created creative if -// successful. A "Standard" user role -// (//support.google.com/displayvideo/answer/2723011) or greater for the parent -// advertiser or partner is required to make this request. +// Delete: Deletes a site from a channel. // -// - advertiserId: Output only. The unique ID of the advertiser the creative -// belongs to. -func (r *AdvertisersCreativesService) Create(advertiserId int64, creative *Creative) *AdvertisersCreativesCreateCall { - c := &AdvertisersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser that owns the parent channel. +// - channelId: The ID of the parent channel to which the site belongs. +// - urlOrAppId: The URL or app ID of the site to delete. +func (r *AdvertisersChannelsSitesService) Delete(advertiserId int64, channelId int64, urlOrAppId string) *AdvertisersChannelsSitesDeleteCall { + c := &AdvertisersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.creative = creative + c.channelId = channelId + c.urlOrAppId = urlOrAppId + return c +} + +// PartnerId sets the optional parameter "partnerId": The ID of the partner +// that owns the parent channel. +func (c *AdvertisersChannelsSitesDeleteCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesDeleteCall { + c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 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 *AdvertisersCreativesCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreativesCreateCall { +func (c *AdvertisersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesCreateCall) Context(ctx context.Context) *AdvertisersCreativesCreateCall { +func (c *AdvertisersChannelsSitesDeleteCall) Context(ctx context.Context) *AdvertisersChannelsSitesDeleteCall { 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 *AdvertisersCreativesCreateCall) Header() http.Header { +func (c *AdvertisersChannelsSitesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) - if err != nil { - return nil, err - } +func (c *AdvertisersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "channelId": strconv.FormatInt(c.channelId, 10), + "urlOrAppId": c.urlOrAppId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.create" call. +// Do executes the "displayvideo.advertisers.channels.sites.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *Creative.ServerResponse.Header or (if a response was returned at all) in +// *Empty.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) { +func (c *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20483,7 +20775,7 @@ func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Crea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Creative{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20494,83 +20786,1241 @@ func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Crea if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersCreativesDeleteCall struct { +type AdvertisersChannelsSitesListCall struct { s *Service advertiserId int64 - creativeId int64 + channelId int64 urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Delete: Deletes a creative. Returns error code `NOT_FOUND` if the creative -// does not exist. The creative should be archived first, i.e. set -// entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be deleted. A -// "Standard" user role (//support.google.com/displayvideo/answer/2723011) or -// greater for the parent advertiser or partner is required to make this -// request. +// List: Lists sites in a channel. +// +// - advertiserId: The ID of the advertiser that owns the parent channel. +// - channelId: The ID of the parent channel to which the requested sites +// belong. +func (r *AdvertisersChannelsSitesService) List(advertiserId int64, channelId int64) *AdvertisersChannelsSitesListCall { + c := &AdvertisersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.channelId = channelId + return c +} + +// Filter sets the optional parameter "filter": Allows filtering by site +// fields. Supported syntax: * Filter expressions for site retrieval can only +// contain at most one restriction. * A restriction has the form of `{field} +// {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported +// fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID +// contains "google": `urlOrAppId : "google" The length of this field should +// be no more than 500 characters. Reference our filter `LIST` requests +// (/display-video/api/guides/how-tos/filters) guide for more information. +func (c *AdvertisersChannelsSitesListCall) Filter(filter string) *AdvertisersChannelsSitesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * `urlOrAppId` (default) The default sorting +// order is ascending. To specify descending order for a field, a suffix " +// desc" should be added to the field name. Example: `urlOrAppId desc`. +func (c *AdvertisersChannelsSitesListCall) OrderBy(orderBy string) *AdvertisersChannelsSitesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Must +// be between `1` and `10000`. If unspecified will default to `100`. Returns +// error code `INVALID_ARGUMENT` if an invalid value is specified. +func (c *AdvertisersChannelsSitesListCall) PageSize(pageSize int64) *AdvertisersChannelsSitesListCall { + 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. Typically, this is the value of +// next_page_token returned from the previous call to `ListSites` method. If +// not specified, the first page of results will be returned. +func (c *AdvertisersChannelsSitesListCall) PageToken(pageToken string) *AdvertisersChannelsSitesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// PartnerId sets the optional parameter "partnerId": The ID of the partner +// that owns the parent channel. +func (c *AdvertisersChannelsSitesListCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesListCall { + c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) + 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 *AdvertisersChannelsSitesListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesListCall { + 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 *AdvertisersChannelsSitesListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsSitesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersChannelsSitesListCall) Context(ctx context.Context) *AdvertisersChannelsSitesListCall { + 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 *AdvertisersChannelsSitesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersChannelsSitesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/channels/{+channelId}/sites") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "channelId": strconv.FormatInt(c.channelId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.channels.sites.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListSitesResponse.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 *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, 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 := &ListSitesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.list", "response", internallog.HTTPResponse(res, b)) + 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 *AdvertisersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) 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 AdvertisersChannelsSitesReplaceCall struct { + s *Service + advertiserId int64 + channelId int64 + replacesitesrequest *ReplaceSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Replace: Replaces all of the sites under a single channel. The operation +// will replace the sites under a channel with the sites provided in +// ReplaceSitesRequest.new_sites. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_timeout) +// to avoid errors. +// +// - advertiserId: The ID of the advertiser that owns the parent channel. +// - channelId: The ID of the parent channel whose sites will be replaced. +func (r *AdvertisersChannelsSitesService) Replace(advertiserId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *AdvertisersChannelsSitesReplaceCall { + c := &AdvertisersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.channelId = channelId + c.replacesitesrequest = replacesitesrequest + 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 *AdvertisersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesReplaceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersChannelsSitesReplaceCall) Context(ctx context.Context) *AdvertisersChannelsSitesReplaceCall { + 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 *AdvertisersChannelsSitesReplaceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.replacesitesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{advertiserId}/channels/{+channelId}/sites:replace") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "channelId": strconv.FormatInt(c.channelId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.replace", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.channels.sites.replace" call. +// Any non-2xx status code is an error. Response headers are in either +// *ReplaceSitesResponse.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 *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, 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 := &ReplaceSitesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.channels.sites.replace", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersCreativesCreateCall struct { + s *Service + advertiserId int64 + creative *Creative + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new creative. Returns the newly created creative if +// successful. A "Standard" user role +// (//support.google.com/displayvideo/answer/2723011) or greater for the parent +// advertiser or partner is required to make this request. +// +// - advertiserId: Output only. The unique ID of the advertiser the creative +// belongs to. +func (r *AdvertisersCreativesService) Create(advertiserId int64, creative *Creative) *AdvertisersCreativesCreateCall { + c := &AdvertisersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.creative = creative + 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 *AdvertisersCreativesCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreativesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesCreateCall) Context(ctx context.Context) *AdvertisersCreativesCreateCall { + 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 *AdvertisersCreativesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Creative.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 *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, 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 := &Creative{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersCreativesDeleteCall struct { + s *Service + advertiserId int64 + creativeId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a creative. Returns error code `NOT_FOUND` if the creative +// does not exist. The creative should be archived first, i.e. set +// entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be deleted. A +// "Standard" user role (//support.google.com/displayvideo/answer/2723011) or +// greater for the parent advertiser or partner is required to make this +// request. +// +// - advertiserId: The ID of the advertiser this creative belongs to. +// - creativeId: The ID of the creative to be deleted. +func (r *AdvertisersCreativesService) Delete(advertiserId int64, creativeId int64) *AdvertisersCreativesDeleteCall { + c := &AdvertisersCreativesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.creativeId = creativeId + 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 *AdvertisersCreativesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCreativesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesDeleteCall) Context(ctx context.Context) *AdvertisersCreativesDeleteCall { + 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 *AdvertisersCreativesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "creativeId": strconv.FormatInt(c.creativeId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersCreativesGetCall struct { + s *Service + advertiserId int64 + creativeId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a creative. +// +// - advertiserId: The ID of the advertiser this creative belongs to. +// - creativeId: The ID of the creative to fetch. +func (r *AdvertisersCreativesService) Get(advertiserId int64, creativeId int64) *AdvertisersCreativesGetCall { + c := &AdvertisersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.creativeId = creativeId + 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 *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersCreativesGetCall { + 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 *AdvertisersCreativesGetCall) IfNoneMatch(entityTag string) *AdvertisersCreativesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesGetCall) Context(ctx context.Context) *AdvertisersCreativesGetCall { + 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 *AdvertisersCreativesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "creativeId": strconv.FormatInt(c.creativeId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Creative.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 *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, 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 := &Creative{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersCreativesListCall struct { + s *Service + advertiserId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists creatives in an advertiser. The order is defined by the order_by +// parameter. If a filter by entity_status is not specified, creatives with +// `ENTITY_STATUS_ARCHIVED` will not be included in the results. +// +// - advertiserId: The ID of the advertiser to list creatives for. +func (r *AdvertisersCreativesService) List(advertiserId int64) *AdvertisersCreativesListCall { + c := &AdvertisersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + return c +} + +// Filter sets the optional parameter "filter": Allows filtering by creative +// fields. Supported syntax: * Filter expressions are made up of one or more +// restrictions. * Restrictions can be combined by `AND` or `OR` logical +// operators. A sequence of restrictions implicitly uses `AND`. * A restriction +// has the form of `{field} {operator} {value}`. * The `lineItemIds` field must +// use the `HAS (:)` operator. * The `updateTime` field must use the `GREATER +// THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` operators. * All +// other fields must use the `EQUALS (=)` operator. * For `entityStatus`, +// `minDuration`, `maxDuration`, `updateTime`, and `dynamic` fields, there may +// be at most one restriction. Supported Fields: * `approvalStatus` * +// `creativeId` * `creativeType` * `dimensions` (input in the form of +// `{width}x{height}`) * `dynamic` * `entityStatus` * `exchangeReviewStatus` +// (input in the form of `{exchange}-{reviewStatus}`) * `lineItemIds` * +// `maxDuration` (input in the form of `{duration}s`. Only seconds are +// supported) * `minDuration` (input in the form of `{duration}s`. Only seconds +// are supported) * `updateTime` (input in ISO 8601 format, or +// `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative resource's +// field value reflects the last time that a creative has been updated, which +// includes updates made by the system (e.g. creative review updates). +// Examples: * All native creatives: `creativeType="CREATIVE_TYPE_NATIVE" * +// All active creatives with 300x400 or 50x100 dimensions: +// `entityStatus="ENTITY_STATUS_ACTIVE" AND (dimensions="300x400" OR +// dimensions="50x100")` * All dynamic creatives that are approved by AdX or +// AppNexus, with a minimum duration of 5 seconds and 200ms: `dynamic="true" +// AND minDuration="5.2s" AND +// (exchangeReviewStatus="EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED" OR +// exchangeReviewStatus="EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED")` * All +// video creatives that are associated with line item ID 1 or 2: +// `creativeType="CREATIVE_TYPE_VIDEO" AND (lineItemIds:1 OR lineItemIds:2)` * +// Find creatives by multiple creative IDs: `creativeId=1 OR creativeId=2` * +// All creatives with an update time greater than or equal to +// 2020-11-04T18:54:47Z (format of ISO 8601): +// `updateTime>="2020-11-04T18:54:47Z" The length of this field should be no +// more than 500 characters. Reference our filter `LIST` requests +// (/display-video/api/guides/how-tos/filters) guide for more information. +func (c *AdvertisersCreativesListCall) Filter(filter string) *AdvertisersCreativesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * `creativeId` (default) * `createTime` * +// `mediaDuration` * `dimensions` (sorts by width first, then by height) The +// default sorting order is ascending. To specify descending order for a field, +// a suffix "desc" should be added to the field name. Example: `createTime +// desc`. +func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreativesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Must +// be between `1` and `200`. If unspecified will default to `100`. Returns +// error code `INVALID_ARGUMENT` if an invalid value is specified. +func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall { + 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. Typically, this is the value of +// next_page_token returned from the previous call to `ListCreatives` method. +// If not specified, the first page of results will be returned. +func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersCreativesListCall { + 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 *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *AdvertisersCreativesListCall { + 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 *AdvertisersCreativesListCall) IfNoneMatch(entityTag string) *AdvertisersCreativesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesListCall) Context(ctx context.Context) *AdvertisersCreativesListCall { + 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 *AdvertisersCreativesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListCreativesResponse.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 *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, 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 := &ListCreativesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.list", "response", internallog.HTTPResponse(res, b)) + 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 *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) 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 AdvertisersCreativesPatchCall struct { + s *Service + advertiserId int64 + creativeId int64 + creative *Creative + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing creative. Returns the updated creative if +// successful. A "Standard" user role +// (//support.google.com/displayvideo/answer/2723011) or greater for the parent +// advertiser or partner is required to make this request. +// +// - advertiserId: Output only. The unique ID of the advertiser the creative +// belongs to. +// - creativeId: Output only. The unique ID of the creative. Assigned by the +// system. +func (r *AdvertisersCreativesService) Patch(advertiserId int64, creativeId int64, creative *Creative) *AdvertisersCreativesPatchCall { + c := &AdvertisersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.creativeId = creativeId + c.creative = creative + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The mask to +// control which fields to update. +func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *AdvertisersCreativesPatchCall { + 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 *AdvertisersCreativesPatchCall) Fields(s ...googleapi.Field) *AdvertisersCreativesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersCreativesPatchCall) Context(ctx context.Context) *AdvertisersCreativesPatchCall { + 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 *AdvertisersCreativesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives/{+creativeId}") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "creativeId": strconv.FormatInt(c.creativeId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.creatives.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Creative.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 *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, 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 := &Creative{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersInsertionOrdersCreateCall struct { + s *Service + advertiserId int64 + insertionorder *InsertionOrder + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new insertion order. Returns the newly created insertion +// order if successful. +// +// - advertiserId: Output only. The unique ID of the advertiser the insertion +// order belongs to. +func (r *AdvertisersInsertionOrdersService) Create(advertiserId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersCreateCall { + c := &AdvertisersInsertionOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.insertionorder = insertionorder + 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 *AdvertisersInsertionOrdersCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersInsertionOrdersCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersCreateCall { + 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 *AdvertisersInsertionOrdersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertionorder) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.insertionOrders.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *InsertionOrder.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 *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, 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 := &InsertionOrder{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersInsertionOrdersDeleteCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an insertion order. Returns error code `NOT_FOUND` if the +// insertion order does not exist. The insertion order should be archived +// first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to +// delete it. +// +// - advertiserId: The ID of the advertiser this insertion order belongs to. +// - insertionOrderId: The ID of the insertion order to delete. +func (r *AdvertisersInsertionOrdersService) Delete(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersDeleteCall { + c := &AdvertisersInsertionOrdersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.insertionOrderId = insertionOrderId + 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 *AdvertisersInsertionOrdersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AdvertisersInsertionOrdersDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersDeleteCall { + 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 *AdvertisersInsertionOrdersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.insertionOrders.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AdvertisersInsertionOrdersGetCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an insertion order. Returns error code `NOT_FOUND` if the +// insertion order does not exist. // -// - advertiserId: The ID of the advertiser this creative belongs to. -// - creativeId: The ID of the creative to be deleted. -func (r *AdvertisersCreativesService) Delete(advertiserId int64, creativeId int64) *AdvertisersCreativesDeleteCall { - c := &AdvertisersCreativesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser this insertion order belongs to. +// - insertionOrderId: The ID of the insertion order to fetch. +func (r *AdvertisersInsertionOrdersService) Get(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersGetCall { + c := &AdvertisersInsertionOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.creativeId = creativeId + c.insertionOrderId = insertionOrderId 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 *AdvertisersCreativesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCreativesDeleteCall { +func (c *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersGetCall { 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 *AdvertisersInsertionOrdersGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesDeleteCall) Context(ctx context.Context) *AdvertisersCreativesDeleteCall { +func (c *AdvertisersInsertionOrdersGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersGetCall { 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 *AdvertisersCreativesDeleteCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "creativeId": strconv.FormatInt(c.creativeId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.delete" call. +// Do executes the "displayvideo.advertisers.insertionOrders.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *InsertionOrder.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 *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20589,7 +22039,7 @@ func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &InsertionOrder{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20600,35 +22050,85 @@ func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empt if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersCreativesGetCall struct { +type AdvertisersInsertionOrdersListCall struct { s *Service advertiserId int64 - creativeId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a creative. +// List: Lists insertion orders in an advertiser. The order is defined by the +// order_by parameter. If a filter by entity_status is not specified, insertion +// orders with `ENTITY_STATUS_ARCHIVED` will not be included in the results. // -// - advertiserId: The ID of the advertiser this creative belongs to. -// - creativeId: The ID of the creative to fetch. -func (r *AdvertisersCreativesService) Get(advertiserId int64, creativeId int64) *AdvertisersCreativesGetCall { - c := &AdvertisersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser to list insertion orders for. +func (r *AdvertisersInsertionOrdersService) List(advertiserId int64) *AdvertisersInsertionOrdersListCall { + c := &AdvertisersInsertionOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.creativeId = creativeId + return c +} + +// Filter sets the optional parameter "filter": Allows filtering by insertion +// order fields. Supported syntax: * Filter expressions are made up of one or +// more restrictions. * Restrictions can be combined by `AND` or `OR` logical +// operators. A sequence of restrictions implicitly uses `AND`. * A restriction +// has the form of `{field} {operator} {value}`. * The `updateTime` field must +// use the `GREATER THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` +// operators. * All other fields must use the `EQUALS (=)` operator. Supported +// fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` +// (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All +// insertion orders under a campaign: `campaignId="1234" * All +// `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders under an +// advertiser: `(entityStatus="ENTITY_STATUS_ACTIVE" OR +// entityStatus="ENTITY_STATUS_PAUSED")` * All insertion orders with an update +// time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): +// `updateTime<="2020-11-04T18:54:47Z" * All insertion orders with an update +// time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): +// `updateTime>="2020-11-04T18:54:47Z" The length of this field should be no +// more than 500 characters. Reference our filter `LIST` requests +// (/display-video/api/guides/how-tos/filters) guide for more information. +func (c *AdvertisersInsertionOrdersListCall) Filter(filter string) *AdvertisersInsertionOrdersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * "displayName" (default) * "entityStatus" * +// "updateTime" The default sorting order is ascending. To specify descending +// order for a field, a suffix "desc" should be added to the field name. +// Example: `displayName desc`. +func (c *AdvertisersInsertionOrdersListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Must +// be between `1` and `100`. If unspecified will default to `100`. Returns +// error code `INVALID_ARGUMENT` if an invalid value is specified. +func (c *AdvertisersInsertionOrdersListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListCall { + 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. Typically, this is the value of +// next_page_token returned from the previous call to `ListInsertionOrders` +// method. If not specified, the first page of results will be returned. +func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListCall { + 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 *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersCreativesGetCall { +func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20636,34 +22136,34 @@ func (c *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersC // 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 *AdvertisersCreativesGetCall) IfNoneMatch(entityTag string) *AdvertisersCreativesGetCall { +func (c *AdvertisersInsertionOrdersListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesGetCall) Context(ctx context.Context) *AdvertisersCreativesGetCall { +func (c *AdvertisersInsertionOrdersListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListCall { 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 *AdvertisersCreativesGetCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -20672,18 +22172,18 @@ func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, err req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "creativeId": strconv.FormatInt(c.creativeId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.get" call. +// Do executes the "displayvideo.advertisers.insertionOrders.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Creative.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 *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) { +// *ListInsertionOrdersResponse.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 *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrdersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20702,7 +22202,7 @@ func (c *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creativ if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Creative{ + ret := &ListInsertionOrdersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20713,94 +22213,98 @@ func (c *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creativ if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersCreativesListCall struct { - s *Service - advertiserId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(*ListInsertionOrdersResponse) 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) + } } -// List: Lists creatives in an advertiser. The order is defined by the order_by -// parameter. If a filter by entity_status is not specified, creatives with -// `ENTITY_STATUS_ARCHIVED` will not be included in the results. +type AdvertisersInsertionOrdersListAssignedTargetingOptionsCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListAssignedTargetingOptions: Lists assigned targeting options of an +// insertion order across targeting types. // -// - advertiserId: The ID of the advertiser to list creatives for. -func (r *AdvertisersCreativesService) List(advertiserId int64) *AdvertisersCreativesListCall { - c := &AdvertisersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - insertionOrderId: The ID of the insertion order to list assigned targeting +// options for. +func (r *AdvertisersInsertionOrdersService) ListAssignedTargetingOptions(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { + c := &AdvertisersInsertionOrdersListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId + c.insertionOrderId = insertionOrderId return c } -// Filter sets the optional parameter "filter": Allows filtering by creative -// fields. Supported syntax: * Filter expressions are made up of one or more -// restrictions. * Restrictions can be combined by `AND` or `OR` logical -// operators. A sequence of restrictions implicitly uses `AND`. * A restriction -// has the form of `{field} {operator} {value}`. * The `lineItemIds` field must -// use the `HAS (:)` operator. * The `updateTime` field must use the `GREATER -// THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` operators. * All -// other fields must use the `EQUALS (=)` operator. * For `entityStatus`, -// `minDuration`, `maxDuration`, `updateTime`, and `dynamic` fields, there may -// be at most one restriction. Supported Fields: * `approvalStatus` * -// `creativeId` * `creativeType` * `dimensions` (input in the form of -// `{width}x{height}`) * `dynamic` * `entityStatus` * `exchangeReviewStatus` -// (input in the form of `{exchange}-{reviewStatus}`) * `lineItemIds` * -// `maxDuration` (input in the form of `{duration}s`. Only seconds are -// supported) * `minDuration` (input in the form of `{duration}s`. Only seconds -// are supported) * `updateTime` (input in ISO 8601 format, or -// `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative resource's -// field value reflects the last time that a creative has been updated, which -// includes updates made by the system (e.g. creative review updates). -// Examples: * All native creatives: `creativeType="CREATIVE_TYPE_NATIVE" * -// All active creatives with 300x400 or 50x100 dimensions: -// `entityStatus="ENTITY_STATUS_ACTIVE" AND (dimensions="300x400" OR -// dimensions="50x100")` * All dynamic creatives that are approved by AdX or -// AppNexus, with a minimum duration of 5 seconds and 200ms: `dynamic="true" -// AND minDuration="5.2s" AND -// (exchangeReviewStatus="EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED" OR -// exchangeReviewStatus="EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED")` * All -// video creatives that are associated with line item ID 1 or 2: -// `creativeType="CREATIVE_TYPE_VIDEO" AND (lineItemIds:1 OR lineItemIds:2)` * -// Find creatives by multiple creative IDs: `creativeId=1 OR creativeId=2` * -// All creatives with an update time greater than or equal to -// 2020-11-04T18:54:47Z (format of ISO 8601): -// `updateTime>="2020-11-04T18:54:47Z" The length of this field should be no +// Filter sets the optional parameter "filter": Allows filtering by assigned +// targeting option fields. Supported syntax: * Filter expressions are made up +// of one or more restrictions. * Restrictions can be combined by the logical +// operator `OR`. * A restriction has the form of `{field} {operator} {value}`. +// * All fields must use the `EQUALS (=)` operator. Supported fields: * +// `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` +// resources of targeting type `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` or +// `TARGETING_TYPE_CHANNEL`: +// `targetingType="TARGETING_TYPE_PROXIMITY_LOCATION_LIST" OR +// targetingType="TARGETING_TYPE_CHANNEL" * `AssignedTargetingOption` +// resources with inheritance status of `NOT_INHERITED` or +// `INHERITED_FROM_PARTNER`: `inheritance="NOT_INHERITED" OR +// inheritance="INHERITED_FROM_PARTNER" The length of this field should be no // more than 500 characters. Reference our filter `LIST` requests // (/display-video/api/guides/how-tos/filters) guide for more information. -func (c *AdvertisersCreativesListCall) Filter(filter string) *AdvertisersCreativesListCall { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Field by which to sort the -// list. Acceptable values are: * `creativeId` (default) * `createTime` * -// `mediaDuration` * `dimensions` (sorts by width first, then by height) The -// default sorting order is ascending. To specify descending order for a field, -// a suffix "desc" should be added to the field name. Example: `createTime -// desc`. -func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreativesListCall { +// OrderBy sets the optional parameter "orderBy": Field by which to sort the +// list. Acceptable values are: * `targetingType` (default) The default sorting +// order is ascending. To specify descending order for a field, a suffix "desc" +// should be added to the field name. Example: `targetingType desc`. +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.urlParams_.Set("orderBy", orderBy) return c } -// PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `200`. If unspecified will default to `100`. Returns -// error code `INVALID_ARGUMENT` if an invalid value is specified. -func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. The +// size must be an integer between `1` and `5000`. If unspecified, the default +// is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is +// specified. +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { 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. Typically, this is the value of -// next_page_token returned from the previous call to `ListCreatives` method. -// If not specified, the first page of results will be returned. -func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersCreativesListCall { +// PageToken sets the optional parameter "pageToken": A token that lets the +// client fetch the next page of results. Typically, this is the value of +// next_page_token returned from the previous call to +// `BulkListInsertionOrderAssignedTargetingOptions` method. If not specified, +// the first page of results will be returned. +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20808,7 +22312,7 @@ func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersC // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *AdvertisersCreativesListCall { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20816,34 +22320,34 @@ func (c *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *Advertisers // 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 *AdvertisersCreativesListCall) IfNoneMatch(entityTag string) *AdvertisersCreativesListCall { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesListCall) Context(ctx context.Context) *AdvertisersCreativesListCall { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall { 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 *AdvertisersCreativesListCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}:listAssignedTargetingOptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -20851,19 +22355,22 @@ func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.listAssignedTargetingOptions", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.list" call. +// Do executes the "displayvideo.advertisers.insertionOrders.listAssignedTargetingOptions" call. // Any non-2xx status code is an error. Response headers are in either -// *ListCreativesResponse.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 *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) { +// *BulkListInsertionOrderAssignedTargetingOptionsResponse.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 *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListInsertionOrderAssignedTargetingOptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20882,7 +22389,7 @@ func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCreativesResponse{ + ret := &BulkListInsertionOrderAssignedTargetingOptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20893,14 +22400,14 @@ func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCr if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.listAssignedTargetingOptions", "response", internallog.HTTPResponse(res, b)) 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 *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error { +func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListInsertionOrderAssignedTargetingOptionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20918,36 +22425,34 @@ func (c *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCr } } -type AdvertisersCreativesPatchCall struct { - s *Service - advertiserId int64 - creativeId int64 - creative *Creative - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersPatchCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + insertionorder *InsertionOrder + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an existing creative. Returns the updated creative if -// successful. A "Standard" user role -// (//support.google.com/displayvideo/answer/2723011) or greater for the parent -// advertiser or partner is required to make this request. +// Patch: Updates an existing insertion order. Returns the updated insertion +// order if successful. // -// - advertiserId: Output only. The unique ID of the advertiser the creative -// belongs to. -// - creativeId: Output only. The unique ID of the creative. Assigned by the -// system. -func (r *AdvertisersCreativesService) Patch(advertiserId int64, creativeId int64, creative *Creative) *AdvertisersCreativesPatchCall { - c := &AdvertisersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: Output only. The unique ID of the advertiser the insertion +// order belongs to. +// - insertionOrderId: Output only. The unique ID of the insertion order. +// Assigned by the system. +func (r *AdvertisersInsertionOrdersService) Patch(advertiserId int64, insertionOrderId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersPatchCall { + c := &AdvertisersInsertionOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.creativeId = creativeId - c.creative = creative + c.insertionOrderId = insertionOrderId + c.insertionorder = insertionorder return c } // UpdateMask sets the optional parameter "updateMask": Required. The mask to // control which fields to update. -func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *AdvertisersCreativesPatchCall { +func (c *AdvertisersInsertionOrdersPatchCall) UpdateMask(updateMask string) *AdvertisersInsertionOrdersPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -20955,35 +22460,35 @@ func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *Advertise // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AdvertisersCreativesPatchCall) Fields(s ...googleapi.Field) *AdvertisersCreativesPatchCall { +func (c *AdvertisersInsertionOrdersPatchCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersCreativesPatchCall) Context(ctx context.Context) *AdvertisersCreativesPatchCall { +func (c *AdvertisersInsertionOrdersPatchCall) Context(ctx context.Context) *AdvertisersInsertionOrdersPatchCall { 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 *AdvertisersCreativesPatchCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertionorder) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/creatives/{+creativeId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -20991,19 +22496,19 @@ func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, e } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "creativeId": strconv.FormatInt(c.creativeId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.creatives.patch" call. +// Do executes the "displayvideo.advertisers.insertionOrders.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Creative.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *InsertionOrder.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 *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) { +func (c *AdvertisersInsertionOrdersPatchCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21022,7 +22527,7 @@ func (c *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Creative{ + ret := &InsertionOrder{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21033,63 +22538,88 @@ func (c *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creat if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.creatives.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersInsertionOrdersCreateCall struct { - s *Service - advertiserId int64 - insertionorder *InsertionOrder - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + assignedtargetingoption *AssignedTargetingOption + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new insertion order. Returns the newly created insertion -// order if successful. +// Create: Assigns a targeting option to an insertion order. Returns the +// assigned targeting option if successful. Supported targeting types: * +// `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * +// `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * +// `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY` // -// - advertiserId: Output only. The unique ID of the advertiser the insertion -// order belongs to. -func (r *AdvertisersInsertionOrdersService) Create(advertiserId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersCreateCall { - c := &AdvertisersInsertionOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - insertionOrderId: The ID of the insertion order the assigned targeting +// option will belong to. +// - targetingType: Identifies the type of this assigned targeting option. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * +// `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` +// - `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, insertionOrderId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId - c.insertionorder = insertionorder + c.insertionOrderId = insertionOrderId + c.targetingType = targetingType + c.assignedtargetingoption = assignedtargetingoption 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 *AdvertisersInsertionOrdersCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersCreateCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersCreateCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall { 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 *AdvertisersInsertionOrdersCreateCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertionorder) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.assignedtargetingoption) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21097,18 +22627,21 @@ func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.create" call. +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *InsertionOrder.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 *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { +// *AssignedTargetingOption.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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21127,7 +22660,7 @@ func (c *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InsertionOrder{ + ret := &AssignedTargetingOption{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21138,61 +22671,85 @@ func (c *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersInsertionOrdersDeleteCall struct { - s *Service - advertiserId int64 - insertionOrderId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + assignedTargetingOptionId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an insertion order. Returns error code `NOT_FOUND` if the -// insertion order does not exist. The insertion order should be archived -// first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to -// delete it. +// Delete: Deletes an assigned targeting option from an insertion order. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * +// `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY` // -// - advertiserId: The ID of the advertiser this insertion order belongs to. -// - insertionOrderId: The ID of the insertion order to delete. -func (r *AdvertisersInsertionOrdersService) Delete(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersDeleteCall { - c := &AdvertisersInsertionOrdersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - assignedTargetingOptionId: The ID of the assigned targeting option to +// delete. +// - insertionOrderId: The ID of the insertion order the assigned targeting +// option belongs to. +// - targetingType: Identifies the type of this assigned targeting option. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * +// `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` +// - `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.insertionOrderId = insertionOrderId + c.targetingType = targetingType + c.assignedTargetingOptionId = assignedTargetingOptionId 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 *AdvertisersInsertionOrdersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersDeleteCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersDeleteCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall { 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 *AdvertisersInsertionOrdersDeleteCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, nil) if err != nil { @@ -21200,19 +22757,21 @@ func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, + "assignedTargetingOptionId": c.assignedTargetingOptionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.delete" call. +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Empty.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21242,36 +22801,70 @@ func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersInsertionOrdersGetCall struct { - s *Service - advertiserId int64 - insertionOrderId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + assignedTargetingOptionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Gets an insertion order. Returns error code `NOT_FOUND` if the -// insertion order does not exist. +// Get: Gets a single targeting option assigned to an insertion order. // -// - advertiserId: The ID of the advertiser this insertion order belongs to. -// - insertionOrderId: The ID of the insertion order to fetch. -func (r *AdvertisersInsertionOrdersService) Get(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersGetCall { - c := &AdvertisersInsertionOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - assignedTargetingOptionId: An identifier unique to the targeting type in +// this insertion order that identifies the assigned targeting option being +// requested. +// - insertionOrderId: The ID of the insertion order the assigned targeting +// option belongs to. +// - targetingType: Identifies the type of this assigned targeting option. +// Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * +// `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * +// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * +// `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * +// `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * +// `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * +// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * +// `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * +// `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * +// `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * +// `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * +// `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * +// `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * +// `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * +// `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * +// `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * +// `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.insertionOrderId = insertionOrderId + c.targetingType = targetingType + c.assignedTargetingOptionId = assignedTargetingOptionId 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 *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersGetCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21279,34 +22872,34 @@ func (c *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *Advert // 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 *AdvertisersInsertionOrdersGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersGetCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersGetCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { 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 *AdvertisersInsertionOrdersGetCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -21314,19 +22907,22 @@ func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, + "assignedTargetingOptionId": c.assignedTargetingOptionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.get" call. +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *InsertionOrder.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 *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { +// *AssignedTargetingOption.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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21345,7 +22941,7 @@ func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*I if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InsertionOrder{ + ret := &AssignedTargetingOption{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21356,77 +22952,103 @@ func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*I if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AdvertisersInsertionOrdersListCall struct { - s *Service - advertiserId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Lists insertion orders in an advertiser. The order is defined by the -// order_by parameter. If a filter by entity_status is not specified, insertion -// orders with `ENTITY_STATUS_ARCHIVED` will not be included in the results. +// List: Lists the targeting options assigned to an insertion order. // -// - advertiserId: The ID of the advertiser to list insertion orders for. -func (r *AdvertisersInsertionOrdersService) List(advertiserId int64) *AdvertisersInsertionOrdersListCall { - c := &AdvertisersInsertionOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - advertiserId: The ID of the advertiser the insertion order belongs to. +// - insertionOrderId: The ID of the insertion order to list assigned targeting +// options for. +// - targetingType: Identifies the type of assigned targeting options to list. +// Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * +// `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * +// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * +// `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * +// `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * +// `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * +// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * +// `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * +// `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * +// `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * +// `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * +// `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * +// `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * +// `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * +// `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * +// `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * +// `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * +// `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, insertionOrderId int64, targetingType string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId + c.insertionOrderId = insertionOrderId + c.targetingType = targetingType return c } -// Filter sets the optional parameter "filter": Allows filtering by insertion -// order fields. Supported syntax: * Filter expressions are made up of one or -// more restrictions. * Restrictions can be combined by `AND` or `OR` logical -// operators. A sequence of restrictions implicitly uses `AND`. * A restriction -// has the form of `{field} {operator} {value}`. * The `updateTime` field must -// use the `GREATER THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` -// operators. * All other fields must use the `EQUALS (=)` operator. Supported -// fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` -// (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All -// insertion orders under a campaign: `campaignId="1234" * All -// `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders under an -// advertiser: `(entityStatus="ENTITY_STATUS_ACTIVE" OR -// entityStatus="ENTITY_STATUS_PAUSED")` * All insertion orders with an update -// time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): -// `updateTime<="2020-11-04T18:54:47Z" * All insertion orders with an update -// time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): -// `updateTime>="2020-11-04T18:54:47Z" The length of this field should be no +// Filter sets the optional parameter "filter": Allows filtering by assigned +// targeting option fields. Supported syntax: * Filter expressions are made up +// of one or more restrictions. * Restrictions can be combined by the logical +// operator `OR`. * A restriction has the form of `{field} {operator} {value}`. +// * All fields must use the `EQUALS (=)` operator. Supported fields: * +// `assignedTargetingOptionId` * `inheritance` Examples: * +// `AssignedTargetingOption` resources with ID 1 or 2: +// `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" * +// `AssignedTargetingOption` resources with inheritance status of +// `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance="NOT_INHERITED" OR +// inheritance="INHERITED_FROM_PARTNER" The length of this field should be no // more than 500 characters. Reference our filter `LIST` requests // (/display-video/api/guides/how-tos/filters) guide for more information. -func (c *AdvertisersInsertionOrdersListCall) Filter(filter string) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Field by which to sort the -// list. Acceptable values are: * "displayName" (default) * "entityStatus" * -// "updateTime" The default sorting order is ascending. To specify descending -// order for a field, a suffix "desc" should be added to the field name. -// Example: `displayName desc`. -func (c *AdvertisersInsertionOrdersListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListCall { +// list. Acceptable values are: * `assignedTargetingOptionId` (default) The +// default sorting order is ascending. To specify descending order for a field, +// a suffix "desc" should be added to the field name. Example: +// `assignedTargetingOptionId desc`. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `100`. If unspecified will default to `100`. Returns +// be between `1` and `5000`. If unspecified will default to `100`. Returns // error code `INVALID_ARGUMENT` if an invalid value is specified. -func (c *AdvertisersInsertionOrdersListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 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. Typically, this is the value of -// next_page_token returned from the previous call to `ListInsertionOrders` -// method. If not specified, the first page of results will be returned. -func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListCall { +// next_page_token returned from the previous call to +// `ListInsertionOrderAssignedTargetingOptions` method. If not specified, the +// first page of results will be returned. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21434,7 +23056,7 @@ func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *Advert // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21442,34 +23064,34 @@ func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *Adver // 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 *AdvertisersInsertionOrdersListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 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 *AdvertisersInsertionOrdersListCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders") + urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -21477,19 +23099,21 @@ func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.list" call. +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListInsertionOrdersResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *ListInsertionOrderAssignedTargetingOptionsResponse.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 *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrdersResponse, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrderAssignedTargetingOptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21508,7 +23132,7 @@ func (c *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListInsertionOrdersResponse{ + ret := &ListInsertionOrderAssignedTargetingOptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21519,14 +23143,14 @@ func (c *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list", "response", internallog.HTTPResponse(res, b)) 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 *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(*ListInsertionOrdersResponse) error) error { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListInsertionOrderAssignedTargetingOptionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -21544,123 +23168,6 @@ func (c *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(* } } -type AdvertisersInsertionOrdersPatchCall struct { - s *Service - advertiserId int64 - insertionOrderId int64 - insertionorder *InsertionOrder - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing insertion order. Returns the updated insertion -// order if successful. -// -// - advertiserId: Output only. The unique ID of the advertiser the insertion -// order belongs to. -// - insertionOrderId: Output only. The unique ID of the insertion order. -// Assigned by the system. -func (r *AdvertisersInsertionOrdersService) Patch(advertiserId int64, insertionOrderId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersPatchCall { - c := &AdvertisersInsertionOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.advertiserId = advertiserId - c.insertionOrderId = insertionOrderId - c.insertionorder = insertionorder - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The mask to -// control which fields to update. -func (c *AdvertisersInsertionOrdersPatchCall) UpdateMask(updateMask string) *AdvertisersInsertionOrdersPatchCall { - 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 *AdvertisersInsertionOrdersPatchCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AdvertisersInsertionOrdersPatchCall) Context(ctx context.Context) *AdvertisersInsertionOrdersPatchCall { - 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 *AdvertisersInsertionOrdersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AdvertisersInsertionOrdersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertionorder) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v4/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") - 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{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "displayvideo.advertisers.insertionOrders.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *InsertionOrder.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 *AdvertisersInsertionOrdersPatchCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, 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 := &InsertionOrder{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "displayvideo.advertisers.insertionOrders.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - type AdvertisersInvoicesListCall struct { s *Service advertiserId int64 diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index ed6975ba8d..2f8a369aae 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -5118,7 +5118,7 @@ } } }, - "revision": "20250720", + "revision": "20250727", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -7204,7 +7204,7 @@ "type": "string" }, "fileTypesToTransform": { - "description": "List of user-specified file type groups to transform. If specified, only the files with these file types will be transformed. If empty, all supported files will be transformed. Supported types may be automatically added over time. If a file type is set in this field that isn't supported by the Deidentify action then the job will fail and will not be successfully created/started. Currently the only file types supported are: IMAGES, TEXT_FILES, CSV, TSV.", + "description": "List of user-specified file type groups to transform. If specified, only the files with these file types are transformed. If empty, all supported files are transformed. Supported types may be automatically added over time. Any unsupported file types that are set in this field are excluded from de-identification. An error is recorded for each unsupported file in the TransformationDetails output table. Currently the only file types supported are: IMAGES, TEXT_FILES, CSV, TSV.", "items": { "enum": [ "FILE_TYPE_UNSPECIFIED", diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index bd3f942fe4..70f1cef921 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -3543,12 +3543,12 @@ type GooglePrivacyDlpV2Deidentify struct { // Form of: gs://bucket/folder/ or gs://bucket CloudStorageOutput string `json:"cloudStorageOutput,omitempty"` // FileTypesToTransform: List of user-specified file type groups to transform. - // If specified, only the files with these file types will be transformed. If - // empty, all supported files will be transformed. Supported types may be - // automatically added over time. If a file type is set in this field that - // isn't supported by the Deidentify action then the job will fail and will not - // be successfully created/started. Currently the only file types supported - // are: IMAGES, TEXT_FILES, CSV, TSV. + // If specified, only the files with these file types are transformed. If + // empty, all supported files are transformed. Supported types may be + // automatically added over time. Any unsupported file types that are set in + // this field are excluded from de-identification. An error is recorded for + // each unsupported file in the TransformationDetails output table. Currently + // the only file types supported are: IMAGES, TEXT_FILES, CSV, TSV. // // Possible values: // "FILE_TYPE_UNSPECIFIED" - Includes all files. diff --git a/gkebackup/v1/gkebackup-api.json b/gkebackup/v1/gkebackup-api.json index f9a4963798..b2e971f3ab 100644 --- a/gkebackup/v1/gkebackup-api.json +++ b/gkebackup/v1/gkebackup-api.json @@ -2227,7 +2227,7 @@ } } }, - "revision": "20250528", + "revision": "20250723", "rootUrl": "https://gkebackup.googleapis.com/", "schemas": { "AuditConfig": { @@ -2447,6 +2447,11 @@ "readOnly": true, "type": "string" }, + "troubleshootingInfo": { + "$ref": "TroubleshootingInfo", + "description": "Output only. Information about the troubleshooting steps which will provide debugging information to the end users.", + "readOnly": true + }, "uid": { "description": "Output only. Server generated global unique identifier of [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier)", "readOnly": true, @@ -3779,6 +3784,11 @@ "readOnly": true, "type": "string" }, + "troubleshootingInfo": { + "$ref": "TroubleshootingInfo", + "description": "Output only. Information about the troubleshooting steps which will provide debugging information to the end users.", + "readOnly": true + }, "uid": { "description": "Output only. Server generated global unique identifier of [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.", "readOnly": true, @@ -4357,6 +4367,23 @@ }, "type": "object" }, + "TroubleshootingInfo": { + "description": "Stores information about troubleshooting doc for debugging a particular state of an operation (eg - backup/restore). This will be used by the end user to debug their operation failure scenario easily.", + "id": "TroubleshootingInfo", + "properties": { + "stateReasonCode": { + "description": "Output only. Unique code for each backup/restore operation failure message which helps user identify the failure.", + "readOnly": true, + "type": "string" + }, + "stateReasonUri": { + "description": "Output only. URL for the troubleshooting doc which will help the user fix the failing backup/restore operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "VolumeBackup": { "description": "Represents the backup of a specific persistent volume as a component of a Backup - both the record of the operation and a pointer to the underlying storage-specific artifacts.", "id": "VolumeBackup", diff --git a/gkebackup/v1/gkebackup-gen.go b/gkebackup/v1/gkebackup-gen.go index f02cf0a137..45a0a2934a 100644 --- a/gkebackup/v1/gkebackup-gen.go +++ b/gkebackup/v1/gkebackup-gen.go @@ -498,6 +498,9 @@ type Backup struct { // should not be used programmatically as this field is not guaranteed to be // consistent. StateReason string `json:"stateReason,omitempty"` + // TroubleshootingInfo: Output only. Information about the troubleshooting + // steps which will provide debugging information to the end users. + TroubleshootingInfo *TroubleshootingInfo `json:"troubleshootingInfo,omitempty"` // Uid: Output only. Server generated global unique identifier of UUID4 // (https://en.wikipedia.org/wiki/Universally_unique_identifier) Uid string `json:"uid,omitempty"` @@ -2282,6 +2285,9 @@ type Restore struct { // should not be used programmatically as this field is not guaranteed to be // consistent. StateReason string `json:"stateReason,omitempty"` + // TroubleshootingInfo: Output only. Information about the troubleshooting + // steps which will provide debugging information to the end users. + TroubleshootingInfo *TroubleshootingInfo `json:"troubleshootingInfo,omitempty"` // Uid: Output only. Server generated global unique identifier of UUID // (https://en.wikipedia.org/wiki/Universally_unique_identifier) format. Uid string `json:"uid,omitempty"` @@ -3097,6 +3103,35 @@ func (s TransformationRuleAction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// TroubleshootingInfo: Stores information about troubleshooting doc for +// debugging a particular state of an operation (eg - backup/restore). This +// will be used by the end user to debug their operation failure scenario +// easily. +type TroubleshootingInfo struct { + // StateReasonCode: Output only. Unique code for each backup/restore operation + // failure message which helps user identify the failure. + StateReasonCode string `json:"stateReasonCode,omitempty"` + // StateReasonUri: Output only. URL for the troubleshooting doc which will help + // the user fix the failing backup/restore operation. + StateReasonUri string `json:"stateReasonUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "StateReasonCode") 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. "StateReasonCode") 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 TroubleshootingInfo) MarshalJSON() ([]byte, error) { + type NoMethod TroubleshootingInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VolumeBackup: Represents the backup of a specific persistent volume as a // component of a Backup - both the record of the operation and a pointer to // the underlying storage-specific artifacts. diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index 476e8edaeb..3becc04c31 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -2412,7 +2412,7 @@ ] }, "retrieveMetadata": { - "description": "RetrieveStudyMetadata returns instance associated with the given study presented as metadata with the bulk data removed. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveStudyMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveStudyMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", + "description": "RetrieveStudyMetadata returns instance associated with the given study presented as metadata. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveStudyMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveStudyMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/metadata", "httpMethod": "GET", "id": "healthcare.projects.locations.datasets.dicomStores.studies.retrieveMetadata", @@ -2623,7 +2623,7 @@ ] }, "retrieveMetadata": { - "description": "RetrieveSeriesMetadata returns instance associated with the given study and series, presented as metadata with the bulk data removed. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveSeriesMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveSeriesMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", + "description": "RetrieveSeriesMetadata returns instance associated with the given study and series, presented as metadata. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveSeriesMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveSeriesMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/metadata", "httpMethod": "GET", "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveMetadata", @@ -2797,7 +2797,7 @@ ] }, "retrieveMetadata": { - "description": "RetrieveInstanceMetadata returns instance associated with the given study, series, and SOP Instance UID presented as metadata with the bulk data removed. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveInstanceMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveInstanceMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", + "description": "RetrieveInstanceMetadata returns instance associated with the given study, series, and SOP Instance UID presented as metadata. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveInstanceMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveInstanceMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/metadata", "httpMethod": "GET", "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveMetadata", @@ -2874,7 +2874,7 @@ "bulkdata": { "methods": { "retrieveBulkdata": { - "description": "Returns uncompressed, unencoded bytes representing the referenced bulkdata tag from an instance. See [Retrieve Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4){: .external}. For details on the implementation of RetrieveBulkdata, see [Bulkdata resources](https://cloud.google.com/healthcare/docs/dicom#bulkdata-resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveBulkdata, see [Retrieve bulkdata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-bulkdata).", + "description": "Returns uncompressed, unencoded bytes representing the referenced bulkdata tag from an instance. See [Retrieve Transaction](http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveBulkdata, see [Bulkdata resources](https://cloud.google.com/healthcare/docs/dicom#bulkdata-resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveBulkdata, see [Retrieve bulkdata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-bulkdata).", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/bulkdata/{bulkdataId}/{bulkdataId1}", "httpMethod": "GET", "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.bulkdata.retrieveBulkdata", @@ -5132,7 +5132,7 @@ } } }, - "revision": "20250625", + "revision": "20250710", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index 68c323ffbc..bcdc1c3890 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -14950,8 +14950,7 @@ type ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall struct { } // RetrieveMetadata: RetrieveStudyMetadata returns instance associated with the -// given study presented as metadata with the bulk data removed. See -// [RetrieveTransaction] +// given study presented as metadata. See [RetrieveTransaction] // (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). // For details on the implementation of RetrieveStudyMetadata, see Metadata // resources @@ -15509,8 +15508,7 @@ type ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall struc } // RetrieveMetadata: RetrieveSeriesMetadata returns instance associated with -// the given study and series, presented as metadata with the bulk data -// removed. See [RetrieveTransaction] +// the given study and series, presented as metadata. See [RetrieveTransaction] // (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). // For details on the implementation of RetrieveSeriesMetadata, see Metadata // resources @@ -15988,8 +15986,8 @@ type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataC } // RetrieveMetadata: RetrieveInstanceMetadata returns instance associated with -// the given study, series, and SOP Instance UID presented as metadata with the -// bulk data removed. See [RetrieveTransaction] +// the given study, series, and SOP Instance UID presented as metadata. See +// [RetrieveTransaction] // (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). // For details on the implementation of RetrieveInstanceMetadata, see Metadata // resources @@ -16184,10 +16182,10 @@ type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveB } // RetrieveBulkdata: Returns uncompressed, unencoded bytes representing the -// referenced bulkdata tag from an instance. See [Retrieve Transaction] -// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4){: -// .external}. For details on the implementation of RetrieveBulkdata, see -// Bulkdata resources +// referenced bulkdata tag from an instance. See Retrieve Transaction +// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). +// For details on the implementation of RetrieveBulkdata, see Bulkdata +// resources // (https://cloud.google.com/healthcare/docs/dicom#bulkdata-resources) in the // Cloud Healthcare API conformance statement. For samples that show how to // call RetrieveBulkdata, see Retrieve bulkdata diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 71c19d7677..7e915e8e4f 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -2506,7 +2506,7 @@ ] }, "retrieveMetadata": { - "description": "RetrieveStudyMetadata returns instance associated with the given study presented as metadata with the bulk data removed. See [RetrieveTransaction](http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveStudyMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveStudyMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", + "description": "RetrieveStudyMetadata returns instance associated with the given study presented as metadata. See [RetrieveTransaction](http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveStudyMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveStudyMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/metadata", "httpMethod": "GET", "id": "healthcare.projects.locations.datasets.dicomStores.studies.retrieveMetadata", @@ -2717,7 +2717,7 @@ ] }, "retrieveMetadata": { - "description": "RetrieveSeriesMetadata returns instance associated with the given study and series, presented as metadata with the bulk data removed. See [RetrieveTransaction](http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveSeriesMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveSeriesMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", + "description": "RetrieveSeriesMetadata returns instance associated with the given study and series, presented as metadata. See [RetrieveTransaction](http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveSeriesMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveSeriesMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/metadata", "httpMethod": "GET", "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveMetadata", @@ -2891,7 +2891,7 @@ ] }, "retrieveMetadata": { - "description": "RetrieveInstanceMetadata returns instance associated with the given study, series, and SOP Instance UID presented as metadata with the bulk data removed. See [RetrieveTransaction](http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveInstanceMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveInstanceMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", + "description": "RetrieveInstanceMetadata returns instance associated with the given study, series, and SOP Instance UID presented as metadata. See [RetrieveTransaction](http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveInstanceMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveInstanceMetadata, see [Retrieve metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/metadata", "httpMethod": "GET", "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveMetadata", @@ -2968,7 +2968,7 @@ "bulkdata": { "methods": { "retrieveBulkdata": { - "description": "Returns uncompressed, unencoded bytes representing the referenced bulkdata tag from an instance. See [Retrieve Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4){: .external}. For details on the implementation of RetrieveBulkdata, see [Bulkdata resources](https://cloud.google.com/healthcare/docs/dicom#bulkdata-resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveBulkdata, see [Retrieve bulkdata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-bulkdata).", + "description": "Returns uncompressed, unencoded bytes representing the referenced bulkdata tag from an instance. See [Retrieve Transaction](http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveBulkdata, see [Bulkdata resources](https://cloud.google.com/healthcare/docs/dicom#bulkdata-resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveBulkdata, see [Retrieve bulkdata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-bulkdata).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/bulkdata/{bulkdataId}/{bulkdataId1}", "httpMethod": "GET", "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.bulkdata.retrieveBulkdata", @@ -5588,7 +5588,7 @@ } } }, - "revision": "20250625", + "revision": "20250710", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 9635ac60b9..45b2bcb4f7 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -16099,8 +16099,7 @@ type ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall struct { } // RetrieveMetadata: RetrieveStudyMetadata returns instance associated with the -// given study presented as metadata with the bulk data removed. See -// RetrieveTransaction +// given study presented as metadata. See RetrieveTransaction // (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). // For details on the implementation of RetrieveStudyMetadata, see Metadata // resources @@ -16657,8 +16656,7 @@ type ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall struc } // RetrieveMetadata: RetrieveSeriesMetadata returns instance associated with -// the given study and series, presented as metadata with the bulk data -// removed. See RetrieveTransaction +// the given study and series, presented as metadata. See RetrieveTransaction // (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). // For details on the implementation of RetrieveSeriesMetadata, see Metadata // resources @@ -17136,8 +17134,8 @@ type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataC } // RetrieveMetadata: RetrieveInstanceMetadata returns instance associated with -// the given study, series, and SOP Instance UID presented as metadata with the -// bulk data removed. See RetrieveTransaction +// the given study, series, and SOP Instance UID presented as metadata. See +// RetrieveTransaction // (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). // For details on the implementation of RetrieveInstanceMetadata, see Metadata // resources @@ -17332,10 +17330,10 @@ type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveB } // RetrieveBulkdata: Returns uncompressed, unencoded bytes representing the -// referenced bulkdata tag from an instance. See [Retrieve Transaction] -// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4){: -// .external}. For details on the implementation of RetrieveBulkdata, see -// Bulkdata resources +// referenced bulkdata tag from an instance. See Retrieve Transaction +// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). +// For details on the implementation of RetrieveBulkdata, see Bulkdata +// resources // (https://cloud.google.com/healthcare/docs/dicom#bulkdata-resources) in the // Cloud Healthcare API conformance statement. For samples that show how to // call RetrieveBulkdata, see Retrieve bulkdata diff --git a/internal/gensupport/resumable.go b/internal/gensupport/resumable.go index 143a48923a..91108d3273 100644 --- a/internal/gensupport/resumable.go +++ b/internal/gensupport/resumable.go @@ -127,34 +127,65 @@ func (rx *ResumableUpload) reportProgress(old, updated int64) { } // transferChunk performs a single HTTP request to upload a single chunk. +// It uses a goroutine to perform the upload and a timer to enforce ChunkTransferTimeout. func (rx *ResumableUpload) transferChunk(ctx context.Context, chunk io.Reader, off, size int64, done bool) (*http.Response, error) { - // rCtx is derived from a context with a defined ChunkTransferTimeout with non-zero value. - // If a particular request exceeds this transfer time for getting response, the rCtx deadline will be exceeded, - // triggering a retry of the request. - var rCtx context.Context - var cancel context.CancelFunc - - rCtx = ctx - if rx.ChunkTransferTimeout != 0 { - rCtx, cancel = context.WithTimeout(ctx, rx.ChunkTransferTimeout) - defer cancel() + // If no timeout is specified, perform the request synchronously without a timer. + if rx.ChunkTransferTimeout == 0 { + res, err := rx.doUploadRequest(ctx, chunk, off, size, done) + if err != nil { + return res, err + } + return res, nil } - res, err := rx.doUploadRequest(rCtx, chunk, off, size, done) - if err != nil { - return res, err - } + // Start a timer for the ChunkTransferTimeout duration. + timer := time.NewTimer(rx.ChunkTransferTimeout) - // We sent "X-GUploader-No-308: yes" (see comment elsewhere in - // this file), so we don't expect to get a 308. - if res.StatusCode == 308 { - return nil, errors.New("unexpected 308 response status code") + // A struct to hold the result from the goroutine. + type uploadResult struct { + res *http.Response + err error } - if res.StatusCode == http.StatusOK { - rx.reportProgress(off, off+int64(size)) + // A buffered channel to receive the result of the upload. + resultCh := make(chan uploadResult, 1) + + // Create a cancellable context for the upload request. This allows us to + // abort the request if the timer fires first. + rCtx, cancel := context.WithCancel(ctx) + // NOTE: We do NOT use `defer cancel()` here. The context must remain valid + // for the caller to read the response body of a successful request. + // Cancellation is handled manually on timeout paths. + + // Starting the chunk upload in parallel. + go func() { + res, err := rx.doUploadRequest(rCtx, chunk, off, size, done) + resultCh <- uploadResult{res: res, err: err} + }() + + // Wait for timer to fire or result channel to have the uploadResult or ctx to be cancelled. + select { + // Note: Calling cancel() will guarantee that the goroutine finishes, + // so these two cases will never block forever on draining the resultCh. + case <-ctx.Done(): + // Context is cancelled for the overall upload. + cancel() + // Drain resultCh. + <-resultCh + return nil, ctx.Err() + case <-timer.C: + // Chunk Transfer timer fired before resultCh so we return context.DeadlineExceeded. + cancel() + // Drain resultCh. + <-resultCh + return nil, context.DeadlineExceeded + case result := <-resultCh: + // Handle the result from the upload. + if result.err != nil { + return result.res, result.err + } + return result.res, nil } - return res, nil } // uploadChunkWithRetries attempts to upload a single chunk, with retries @@ -164,14 +195,14 @@ func (rx *ResumableUpload) uploadChunkWithRetries(ctx context.Context, chunk io. shouldRetry := rx.Retry.errorFunc() // Configure single chunk retry deadline. - retryDeadline := defaultRetryDeadline + chunkRetryDeadline := defaultRetryDeadline if rx.ChunkRetryDeadline != 0 { - retryDeadline = rx.ChunkRetryDeadline + chunkRetryDeadline = rx.ChunkRetryDeadline } // Each chunk gets its own initialized-at-zero backoff and invocation ID. bo := rx.Retry.backoff() - quitAfterTimer := time.NewTimer(retryDeadline) + quitAfterTimer := time.NewTimer(chunkRetryDeadline) defer quitAfterTimer.Stop() rx.attempts = 1 rx.invocationID = uuid.New().String() @@ -184,20 +215,20 @@ func (rx *ResumableUpload) uploadChunkWithRetries(ctx context.Context, chunk io. for { // Wait for the backoff period, unless the context is canceled or the // retry deadline is hit. - pauseTimer := time.NewTimer(pause) + backoffPauseTimer := time.NewTimer(pause) select { case <-ctx.Done(): - pauseTimer.Stop() + backoffPauseTimer.Stop() if err == nil { err = ctx.Err() } return resp, err - case <-pauseTimer.C: + case <-backoffPauseTimer.C: case <-quitAfterTimer.C: - pauseTimer.Stop() + backoffPauseTimer.Stop() return resp, err } - pauseTimer.Stop() + backoffPauseTimer.Stop() // Check for context cancellation or timeout once more. If more than one // case in the select statement above was satisfied at the same time, Go @@ -233,6 +264,11 @@ func (rx *ResumableUpload) uploadChunkWithRetries(ctx context.Context, chunk io. if resp != nil { status = resp.StatusCode } + // We sent "X-GUploader-No-308: yes" (see comment elsewhere in + // this file), so we don't expect to get a 308. + if status == 308 { + return nil, errors.New("unexpected 308 response status code") + } // Chunk upload should be retried if the ChunkTransferTimeout is non-zero and err is context deadline exceeded // or we encounter a retryable error. if (rx.ChunkTransferTimeout != 0 && errors.Is(err, context.DeadlineExceeded)) || shouldRetry(status, err) { @@ -283,7 +319,9 @@ func (rx *ResumableUpload) Upload(ctx context.Context) (*http.Response, error) { if resp == nil { return nil, fmt.Errorf("upload request to %v not sent, choose larger value for ChunkRetryDeadline", rx.URI) } - + if resp.StatusCode == http.StatusOK { + rx.reportProgress(off, off+int64(size)) + } if statusResumeIncomplete(resp) { // The upload is not yet complete, but the server has acknowledged this chunk. // We don't have anything to do with the response body. diff --git a/internal/gensupport/resumable_test.go b/internal/gensupport/resumable_test.go index 8187120815..e6c8ed9f5d 100644 --- a/internal/gensupport/resumable_test.go +++ b/internal/gensupport/resumable_test.go @@ -72,8 +72,11 @@ func (t *interruptibleTransport) RoundTrip(req *http.Request) (*http.Response, e } ev := t.events[0] t.events = t.events[1:] - if ev.delay > 0 { - time.Sleep(ev.delay) + stallTimer := time.NewTimer(ev.delay) + select { + case <-stallTimer.C: + case <-req.Context().Done(): + return nil, req.Context().Err() } if got, want := req.Header.Get("Content-Range"), ev.byteRange; got != want { return nil, fmt.Errorf("byte range: got %s; want %s", got, want) diff --git a/internal/version.go b/internal/version.go index 11a0db6e51..acea3565d0 100644 --- a/internal/version.go +++ b/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.244.0" +const Version = "0.245.0" diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index 9afc4d14a3..a009b11cd6 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -2311,7 +2311,7 @@ } } }, - "revision": "20250727", + "revision": "20250729", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "About": { @@ -2356,7 +2356,7 @@ "type": "object" }, "Accepted": { - "description": "Describes the [accepted terms of service](/merchant/api/guides/accounts/create-and-configure#accept_the_merchant_center_terms_of_service).", + "description": "Describes the [accepted terms of service](https://developers.google.com/merchant/api/guides/accounts/create-and-configure#accept_the_merchant_center_terms_of_service).", "id": "Accepted", "properties": { "acceptedBy": { @@ -5406,7 +5406,7 @@ "type": "string" }, "warehouse": { - "description": "Required. Warehouse name. This should match [warehouse](/merchant/api/reference/rest/accounts_v1beta/accounts.shippingSettings#warehouse)", + "description": "Required. Warehouse name. This should match warehouse.", "type": "string" } }, diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index 83767492e0..7e7bd3e50a 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -475,8 +475,7 @@ func (s AcceptTermsOfServiceResponse) MarshalJSON() ([]byte, error) { } // Accepted: Describes the accepted terms of service -// (/merchant/api/guides/accounts/create-and-configure#accept_the_merchant_cente -// r_terms_of_service). +// (https://developers.google.com/merchant/api/guides/accounts/create-and-configure#accept_the_merchant_center_terms_of_service). type Accepted struct { // AcceptedBy: Required. The account where the acceptance was recorded. This // can be the account itself or, in the case of subaccounts, the advanced @@ -4572,9 +4571,7 @@ type WarehouseBasedDeliveryTime struct { // CarrierService: Required. Carrier service, such as "ground" or "2 days". // The name of the service must be in the eddSupportedServices list. CarrierService string `json:"carrierService,omitempty"` - // Warehouse: Required. Warehouse name. This should match warehouse - // (/merchant/api/reference/rest/accounts_v1beta/accounts.shippingSettings#wareh - // ouse) + // Warehouse: Required. Warehouse name. This should match warehouse. Warehouse string `json:"warehouse,omitempty"` // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/monitoring/v1/monitoring-api.json b/monitoring/v1/monitoring-api.json index e179bd5928..4077c0f2c6 100644 --- a/monitoring/v1/monitoring-api.json +++ b/monitoring/v1/monitoring-api.json @@ -753,7 +753,7 @@ } } }, - "revision": "20250529", + "revision": "20250723", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -1496,7 +1496,7 @@ "type": "object" }, "Field": { - "description": "A single field of a message type.", + "description": "A single field of a message type.New usages of this message as an alternative to FieldDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", "id": "Field", "properties": { "cardinality": { @@ -1939,7 +1939,7 @@ "type": "object" }, "Option": { - "description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", + "description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.New usages of this message as an alternative to FileOptions, MessageOptions, FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions are strongly discouraged.", "id": "Option", "properties": { "name": { @@ -2915,7 +2915,7 @@ "type": "object" }, "Type": { - "description": "A protocol buffer message type.", + "description": "A protocol buffer message type.New usages of this message as an alternative to DescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", "id": "Type", "properties": { "edition": { diff --git a/monitoring/v1/monitoring-gen.go b/monitoring/v1/monitoring-gen.go index 3b2a619b46..006e9b16dc 100644 --- a/monitoring/v1/monitoring-gen.go +++ b/monitoring/v1/monitoring-gen.go @@ -1302,7 +1302,11 @@ func (s EventAnnotation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Field: A single field of a message type. +// Field: A single field of a message type.New usages of this message as an +// alternative to FieldDescriptorProto are strongly discouraged. This message +// does not reliability preserve all information necessary to model the schema +// and preserve semantics. Instead make use of FileDescriptorSet which +// preserves the necessary information. type Field struct { // Cardinality: The field cardinality. // @@ -1913,7 +1917,9 @@ func (s OpsAnalyticsQuery) MarshalJSON() ([]byte, error) { } // Option: A protocol buffer option, which can be attached to a message, field, -// enumeration, etc. +// enumeration, etc.New usages of this message as an alternative to +// FileOptions, MessageOptions, FieldOptions, EnumOptions, EnumValueOptions, +// ServiceOptions, or MethodOptions are strongly discouraged. type Option struct { // Name: The option's name. For protobuf built-in options (options defined in // descriptor.proto), this is the short name. For example, "map_entry". For @@ -3170,7 +3176,11 @@ func (s TreemapDataSet) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Type: A protocol buffer message type. +// Type: A protocol buffer message type.New usages of this message as an +// alternative to DescriptorProto are strongly discouraged. This message does +// not reliability preserve all information necessary to model the schema and +// preserve semantics. Instead make use of FileDescriptorSet which preserves +// the necessary information. type Type struct { // Edition: The source edition string, only valid when syntax is // SYNTAX_EDITIONS. diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index 60bd03b2e8..f9849decf5 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -2720,7 +2720,7 @@ } } }, - "revision": "20250515", + "revision": "20250723", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -3638,7 +3638,7 @@ "type": "object" }, "Field": { - "description": "A single field of a message type.", + "description": "A single field of a message type.New usages of this message as an alternative to FieldDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", "id": "Field", "properties": { "cardinality": { @@ -5188,7 +5188,7 @@ "type": "object" }, "Option": { - "description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", + "description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.New usages of this message as an alternative to FileOptions, MessageOptions, FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions are strongly discouraged.", "id": "Option", "properties": { "name": { @@ -5997,7 +5997,7 @@ "type": "object" }, "Type": { - "description": "A protocol buffer message type.", + "description": "A protocol buffer message type.New usages of this message as an alternative to DescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", "id": "Type", "properties": { "edition": { diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index 1b108ac2d9..6f6831316e 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -1931,7 +1931,11 @@ func (s *Exponential) UnmarshalJSON(data []byte) error { return nil } -// Field: A single field of a message type. +// Field: A single field of a message type.New usages of this message as an +// alternative to FieldDescriptorProto are strongly discouraged. This message +// does not reliability preserve all information necessary to model the schema +// and preserve semantics. Instead make use of FileDescriptorSet which +// preserves the necessary information. type Field struct { // Cardinality: The field cardinality. // @@ -4233,7 +4237,9 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { } // Option: A protocol buffer option, which can be attached to a message, field, -// enumeration, etc. +// enumeration, etc.New usages of this message as an alternative to +// FileOptions, MessageOptions, FieldOptions, EnumOptions, EnumValueOptions, +// ServiceOptions, or MethodOptions are strongly discouraged. type Option struct { // Name: The option's name. For protobuf built-in options (options defined in // descriptor.proto), this is the short name. For example, "map_entry". For @@ -5515,7 +5521,11 @@ func (s *Trigger) UnmarshalJSON(data []byte) error { return nil } -// Type: A protocol buffer message type. +// Type: A protocol buffer message type.New usages of this message as an +// alternative to DescriptorProto are strongly discouraged. This message does +// not reliability preserve all information necessary to model the schema and +// preserve semantics. Instead make use of FileDescriptorSet which preserves +// the necessary information. type Type struct { // Edition: The source edition string, only valid when syntax is // SYNTAX_EDITIONS. diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index c4002b8e2b..e76fe2d72f 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -1289,7 +1289,7 @@ } } }, - "revision": "20250716", + "revision": "20250723", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -2574,6 +2574,11 @@ "readOnly": true, "type": "array" }, + "cloudVpcId": { + "description": "Output only. The id of Virtual Private Cloud (VPC) of the host.", + "readOnly": true, + "type": "string" + }, "cloudZone": { "description": "Output only. The cloud zone of the host.", "readOnly": true, diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 4361d7e683..4a3036639b 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -1782,6 +1782,8 @@ type Host struct { // CloudVirtualNetworkIds: Output only. The ids of cloud virtual networks of // the host. CloudVirtualNetworkIds []string `json:"cloudVirtualNetworkIds,omitempty"` + // CloudVpcId: Output only. The id of Virtual Private Cloud (VPC) of the host. + CloudVpcId string `json:"cloudVpcId,omitempty"` // CloudZone: Output only. The cloud zone of the host. CloudZone string `json:"cloudZone,omitempty"` // Os: Output only. The operating system of the host. diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index ad2b220f0d..a004cf0da4 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -3004,7 +3004,7 @@ } } }, - "revision": "20250709", + "revision": "20250723", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -3136,11 +3136,13 @@ "description": "Optional. The format of communication supported by the callout extension. If not specified, the default value `EXT_PROC_GRPC` is used.", "enum": [ "WIRE_FORMAT_UNSPECIFIED", - "EXT_PROC_GRPC" + "EXT_PROC_GRPC", + "EXT_AUTHZ_GRPC" ], "enumDescriptions": [ "Not specified.", - "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream." + "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream.", + "The extension service uses Envoy's `ext_authz` gRPC API. The backend service for the extension must use HTTP2, or H2C as the protocol. `EXT_AUTHZ_GRPC` is only supported for `AuthzExtension` resources." ], "type": "string" } @@ -5946,12 +5948,12 @@ "type": "string" }, "imageDigest": { - "description": "Output only. The resolved digest for the image specified in the `image` field. The digest is resolved during the creation of `WasmPluginVersion` resource. This field holds the digest value, regardless of whether a tag or digest was originally specified in the `image` field.", + "description": "Output only. This field holds the digest (usually checksum) value for the plugin image. The value is calculated based on the `image_uri` field. If the `image_uri` field refers to a container image, the digest value is obtained from the container image. If the `image_uri` field refers to a generic artifact, the digest value is calculated based on the contents of the file.", "readOnly": true, "type": "string" }, "imageUri": { - "description": "Optional. URI of the container image containing the plugin, stored in the Artifact Registry. When a new `WasmPluginVersion` resource is created, the digest of the container image is saved in the `image_digest` field. When downloading an image, the digest value is used instead of an image tag.", + "description": "Optional. URI of the image containing the Wasm module, stored in Artifact Registry. The URI can refer to one of the following repository formats: * Container images: the `image_uri` must point to a container that contains a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `image_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `image_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `image_digest` field.", "type": "string" }, "labels": { @@ -5971,12 +5973,12 @@ "type": "string" }, "pluginConfigDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` or the container image defined by the `plugin_config_uri` field.", + "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` field or the image defined by the `plugin_config_uri` field.", "readOnly": true, "type": "string" }, "pluginConfigUri": { - "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The container image must contain only a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the container image is saved in the `plugin_config_digest` field.", + "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The URI can refer to one of the following repository formats: * Container images: the `plugin_config_uri` must point to a container that contains a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `plugin_config_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `plugin_config_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `plugin_config_digest` field.", "type": "string" }, "updateTime": { @@ -6003,12 +6005,12 @@ "type": "string" }, "imageDigest": { - "description": "Output only. The resolved digest for the image specified in `image`. The digest is resolved during the creation of a `WasmPluginVersion` resource. This field holds the digest value regardless of whether a tag or digest was originally specified in the `image` field.", + "description": "Output only. This field holds the digest (usually checksum) value for the plugin image. The value is calculated based on the `image_uri` field. If the `image_uri` field refers to a container image, the digest value is obtained from the container image. If the `image_uri` field refers to a generic artifact, the digest value is calculated based on the contents of the file.", "readOnly": true, "type": "string" }, "imageUri": { - "description": "Optional. URI of the container image containing the Wasm module, stored in the Artifact Registry. The container image must contain only a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the URI gets resolved to an image digest and saved in the `image_digest` field.", + "description": "Optional. URI of the image containing the Wasm module, stored in Artifact Registry. The URI can refer to one of the following repository formats: * Container images: the `image_uri` must point to a container that contains a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `image_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `image_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `image_digest` field.", "type": "string" }, "labels": { @@ -6024,12 +6026,12 @@ "type": "string" }, "pluginConfigDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of the `plugin_config_data` field or the container image defined by the `plugin_config_uri` field.", + "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` field or the image defined by the `plugin_config_uri` field.", "readOnly": true, "type": "string" }, "pluginConfigUri": { - "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The container image must contain only a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the container image is saved in the `plugin_config_digest` field.", + "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The URI can refer to one of the following repository formats: * Container images: the `plugin_config_uri` must point to a container that contains a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `plugin_config_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `plugin_config_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `plugin_config_digest` field.", "type": "string" }, "updateTime": { diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index 6dd3c141ad..20a5358535 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -569,6 +569,9 @@ type AuthzExtension struct { // backend service for the extension must use HTTP2 or H2C as the protocol. All // `supported_events` for a client request are sent as part of the same gRPC // stream. + // "EXT_AUTHZ_GRPC" - The extension service uses Envoy's `ext_authz` gRPC + // API. The backend service for the extension must use HTTP2, or H2C as the + // protocol. `EXT_AUTHZ_GRPC` is only supported for `AuthzExtension` resources. WireFormat string `json:"wireFormat,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -4417,16 +4420,26 @@ type WasmPluginVersion struct { CreateTime string `json:"createTime,omitempty"` // Description: Optional. A human-readable description of the resource. Description string `json:"description,omitempty"` - // ImageDigest: Output only. The resolved digest for the image specified in the - // `image` field. The digest is resolved during the creation of - // `WasmPluginVersion` resource. This field holds the digest value, regardless - // of whether a tag or digest was originally specified in the `image` field. + // ImageDigest: Output only. This field holds the digest (usually checksum) + // value for the plugin image. The value is calculated based on the `image_uri` + // field. If the `image_uri` field refers to a container image, the digest + // value is obtained from the container image. If the `image_uri` field refers + // to a generic artifact, the digest value is calculated based on the contents + // of the file. ImageDigest string `json:"imageDigest,omitempty"` - // ImageUri: Optional. URI of the container image containing the plugin, stored - // in the Artifact Registry. When a new `WasmPluginVersion` resource is - // created, the digest of the container image is saved in the `image_digest` - // field. When downloading an image, the digest value is used instead of an - // image tag. + // ImageUri: Optional. URI of the image containing the Wasm module, stored in + // Artifact Registry. The URI can refer to one of the following repository + // formats: * Container images: the `image_uri` must point to a container that + // contains a single file with the name `plugin.wasm`. When a new + // `WasmPluginVersion` resource is created, the digest of the image is saved in + // the `image_digest` field. When pulling a container image from Artifact + // Registry, the digest value is used instead of an image tag. * Generic + // artifacts: the `image_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. The specified package and version + // must contain a file with the name `plugin.wasm`. When a new + // `WasmPluginVersion` resource is created, the checksum of the contents of the + // file is saved in the `image_digest` field. ImageUri string `json:"imageUri,omitempty"` // Labels: Optional. Set of labels associated with the `WasmPluginVersion` // resource. @@ -4442,15 +4455,23 @@ type WasmPluginVersion struct { PluginConfigData string `json:"pluginConfigData,omitempty"` // PluginConfigDigest: Output only. This field holds the digest (usually // checksum) value for the plugin configuration. The value is calculated based - // on the contents of `plugin_config_data` or the container image defined by - // the `plugin_config_uri` field. + // on the contents of `plugin_config_data` field or the image defined by the + // `plugin_config_uri` field. PluginConfigDigest string `json:"pluginConfigDigest,omitempty"` // PluginConfigUri: URI of the plugin configuration stored in the Artifact // Registry. The configuration is provided to the plugin at runtime through the - // `ON_CONFIGURE` callback. The container image must contain only a single file - // with the name `plugin.config`. When a new `WasmPluginVersion` resource is - // created, the digest of the container image is saved in the - // `plugin_config_digest` field. + // `ON_CONFIGURE` callback. The URI can refer to one of the following + // repository formats: * Container images: the `plugin_config_uri` must point + // to a container that contains a single file with the name `plugin.config`. + // When a new `WasmPluginVersion` resource is created, the digest of the image + // is saved in the `plugin_config_digest` field. When pulling a container image + // from Artifact Registry, the digest value is used instead of an image tag. * + // Generic artifacts: the `plugin_config_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. The specified package and version + // must contain a file with the name `plugin.config`. When a new + // `WasmPluginVersion` resource is created, the checksum of the contents of the + // file is saved in the `plugin_config_digest` field. PluginConfigUri string `json:"pluginConfigUri,omitempty"` // UpdateTime: Output only. The timestamp when the resource was updated. UpdateTime string `json:"updateTime,omitempty"` @@ -4482,16 +4503,26 @@ type WasmPluginVersionDetails struct { CreateTime string `json:"createTime,omitempty"` // Description: Optional. A human-readable description of the resource. Description string `json:"description,omitempty"` - // ImageDigest: Output only. The resolved digest for the image specified in - // `image`. The digest is resolved during the creation of a `WasmPluginVersion` - // resource. This field holds the digest value regardless of whether a tag or - // digest was originally specified in the `image` field. + // ImageDigest: Output only. This field holds the digest (usually checksum) + // value for the plugin image. The value is calculated based on the `image_uri` + // field. If the `image_uri` field refers to a container image, the digest + // value is obtained from the container image. If the `image_uri` field refers + // to a generic artifact, the digest value is calculated based on the contents + // of the file. ImageDigest string `json:"imageDigest,omitempty"` - // ImageUri: Optional. URI of the container image containing the Wasm module, - // stored in the Artifact Registry. The container image must contain only a - // single file with the name `plugin.wasm`. When a new `WasmPluginVersion` - // resource is created, the URI gets resolved to an image digest and saved in - // the `image_digest` field. + // ImageUri: Optional. URI of the image containing the Wasm module, stored in + // Artifact Registry. The URI can refer to one of the following repository + // formats: * Container images: the `image_uri` must point to a container that + // contains a single file with the name `plugin.wasm`. When a new + // `WasmPluginVersion` resource is created, the digest of the image is saved in + // the `image_digest` field. When pulling a container image from Artifact + // Registry, the digest value is used instead of an image tag. * Generic + // artifacts: the `image_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. The specified package and version + // must contain a file with the name `plugin.wasm`. When a new + // `WasmPluginVersion` resource is created, the checksum of the contents of the + // file is saved in the `image_digest` field. ImageUri string `json:"imageUri,omitempty"` // Labels: Optional. Set of labels associated with the `WasmPluginVersion` // resource. @@ -4503,15 +4534,23 @@ type WasmPluginVersionDetails struct { PluginConfigData string `json:"pluginConfigData,omitempty"` // PluginConfigDigest: Output only. This field holds the digest (usually // checksum) value for the plugin configuration. The value is calculated based - // on the contents of the `plugin_config_data` field or the container image - // defined by the `plugin_config_uri` field. + // on the contents of `plugin_config_data` field or the image defined by the + // `plugin_config_uri` field. PluginConfigDigest string `json:"pluginConfigDigest,omitempty"` // PluginConfigUri: URI of the plugin configuration stored in the Artifact // Registry. The configuration is provided to the plugin at runtime through the - // `ON_CONFIGURE` callback. The container image must contain only a single file - // with the name `plugin.config`. When a new `WasmPluginVersion` resource is - // created, the digest of the container image is saved in the - // `plugin_config_digest` field. + // `ON_CONFIGURE` callback. The URI can refer to one of the following + // repository formats: * Container images: the `plugin_config_uri` must point + // to a container that contains a single file with the name `plugin.config`. + // When a new `WasmPluginVersion` resource is created, the digest of the image + // is saved in the `plugin_config_digest` field. When pulling a container image + // from Artifact Registry, the digest value is used instead of an image tag. * + // Generic artifacts: the `plugin_config_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. The specified package and version + // must contain a file with the name `plugin.config`. When a new + // `WasmPluginVersion` resource is created, the checksum of the contents of the + // file is saved in the `plugin_config_digest` field. PluginConfigUri string `json:"pluginConfigUri,omitempty"` // UpdateTime: Output only. The timestamp when the resource was updated. UpdateTime string `json:"updateTime,omitempty"` diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 4fcc158f4c..c95fd39a26 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -2913,7 +2913,7 @@ } } }, - "revision": "20250709", + "revision": "20250723", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuthzExtension": { @@ -2997,11 +2997,13 @@ "description": "Optional. The format of communication supported by the callout extension. If not specified, the default value `EXT_PROC_GRPC` is used.", "enum": [ "WIRE_FORMAT_UNSPECIFIED", - "EXT_PROC_GRPC" + "EXT_PROC_GRPC", + "EXT_AUTHZ_GRPC" ], "enumDescriptions": [ "Not specified.", - "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream." + "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream.", + "The extension service uses Envoy's `ext_authz` gRPC API. The backend service for the extension must use HTTP2, or H2C as the protocol. `EXT_AUTHZ_GRPC` is only supported for `AuthzExtension` resources." ], "type": "string" } @@ -5810,12 +5812,12 @@ "type": "string" }, "imageDigest": { - "description": "Output only. The resolved digest for the image specified in the `image` field. The digest is resolved during the creation of `WasmPluginVersion` resource. This field holds the digest value, regardless of whether a tag or digest was originally specified in the `image` field.", + "description": "Output only. This field holds the digest (usually checksum) value for the plugin image. The value is calculated based on the `image_uri` field. If the `image_uri` field refers to a container image, the digest value is obtained from the container image. If the `image_uri` field refers to a generic artifact, the digest value is calculated based on the contents of the file.", "readOnly": true, "type": "string" }, "imageUri": { - "description": "Optional. URI of the container image containing the plugin, stored in the Artifact Registry. When a new `WasmPluginVersion` resource is created, the digest of the container image is saved in the `image_digest` field. When downloading an image, the digest value is used instead of an image tag.", + "description": "Optional. URI of the image containing the Wasm module, stored in Artifact Registry. The URI can refer to one of the following repository formats: * Container images: the `image_uri` must point to a container that contains a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `image_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `image_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `image_digest` field.", "type": "string" }, "labels": { @@ -5835,12 +5837,12 @@ "type": "string" }, "pluginConfigDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` or the container image defined by the `plugin_config_uri` field.", + "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` field or the image defined by the `plugin_config_uri` field.", "readOnly": true, "type": "string" }, "pluginConfigUri": { - "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The container image must contain only a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the container image is saved in the `plugin_config_digest` field.", + "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The URI can refer to one of the following repository formats: * Container images: the `plugin_config_uri` must point to a container that contains a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `plugin_config_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `plugin_config_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `plugin_config_digest` field.", "type": "string" }, "updateTime": { @@ -5867,12 +5869,12 @@ "type": "string" }, "imageDigest": { - "description": "Output only. The resolved digest for the image specified in `image`. The digest is resolved during the creation of a `WasmPluginVersion` resource. This field holds the digest value regardless of whether a tag or digest was originally specified in the `image` field.", + "description": "Output only. This field holds the digest (usually checksum) value for the plugin image. The value is calculated based on the `image_uri` field. If the `image_uri` field refers to a container image, the digest value is obtained from the container image. If the `image_uri` field refers to a generic artifact, the digest value is calculated based on the contents of the file.", "readOnly": true, "type": "string" }, "imageUri": { - "description": "Optional. URI of the container image containing the Wasm module, stored in the Artifact Registry. The container image must contain only a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the URI gets resolved to an image digest and saved in the `image_digest` field.", + "description": "Optional. URI of the image containing the Wasm module, stored in Artifact Registry. The URI can refer to one of the following repository formats: * Container images: the `image_uri` must point to a container that contains a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `image_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `image_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `image_digest` field.", "type": "string" }, "labels": { @@ -5888,12 +5890,12 @@ "type": "string" }, "pluginConfigDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of the `plugin_config_data` field or the container image defined by the `plugin_config_uri` field.", + "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` field or the image defined by the `plugin_config_uri` field.", "readOnly": true, "type": "string" }, "pluginConfigUri": { - "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The container image must contain only a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the container image is saved in the `plugin_config_digest` field.", + "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The URI can refer to one of the following repository formats: * Container images: the `plugin_config_uri` must point to a container that contains a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `plugin_config_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `plugin_config_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `plugin_config_digest` field.", "type": "string" }, "updateTime": { diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 5c2afbed44..8b104881e7 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -469,6 +469,9 @@ type AuthzExtension struct { // backend service for the extension must use HTTP2 or H2C as the protocol. All // `supported_events` for a client request are sent as part of the same gRPC // stream. + // "EXT_AUTHZ_GRPC" - The extension service uses Envoy's `ext_authz` gRPC + // API. The backend service for the extension must use HTTP2, or H2C as the + // protocol. `EXT_AUTHZ_GRPC` is only supported for `AuthzExtension` resources. WireFormat string `json:"wireFormat,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -4147,16 +4150,26 @@ type WasmPluginVersion struct { CreateTime string `json:"createTime,omitempty"` // Description: Optional. A human-readable description of the resource. Description string `json:"description,omitempty"` - // ImageDigest: Output only. The resolved digest for the image specified in the - // `image` field. The digest is resolved during the creation of - // `WasmPluginVersion` resource. This field holds the digest value, regardless - // of whether a tag or digest was originally specified in the `image` field. + // ImageDigest: Output only. This field holds the digest (usually checksum) + // value for the plugin image. The value is calculated based on the `image_uri` + // field. If the `image_uri` field refers to a container image, the digest + // value is obtained from the container image. If the `image_uri` field refers + // to a generic artifact, the digest value is calculated based on the contents + // of the file. ImageDigest string `json:"imageDigest,omitempty"` - // ImageUri: Optional. URI of the container image containing the plugin, stored - // in the Artifact Registry. When a new `WasmPluginVersion` resource is - // created, the digest of the container image is saved in the `image_digest` - // field. When downloading an image, the digest value is used instead of an - // image tag. + // ImageUri: Optional. URI of the image containing the Wasm module, stored in + // Artifact Registry. The URI can refer to one of the following repository + // formats: * Container images: the `image_uri` must point to a container that + // contains a single file with the name `plugin.wasm`. When a new + // `WasmPluginVersion` resource is created, the digest of the image is saved in + // the `image_digest` field. When pulling a container image from Artifact + // Registry, the digest value is used instead of an image tag. * Generic + // artifacts: the `image_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. The specified package and version + // must contain a file with the name `plugin.wasm`. When a new + // `WasmPluginVersion` resource is created, the checksum of the contents of the + // file is saved in the `image_digest` field. ImageUri string `json:"imageUri,omitempty"` // Labels: Optional. Set of labels associated with the `WasmPluginVersion` // resource. @@ -4172,15 +4185,23 @@ type WasmPluginVersion struct { PluginConfigData string `json:"pluginConfigData,omitempty"` // PluginConfigDigest: Output only. This field holds the digest (usually // checksum) value for the plugin configuration. The value is calculated based - // on the contents of `plugin_config_data` or the container image defined by - // the `plugin_config_uri` field. + // on the contents of `plugin_config_data` field or the image defined by the + // `plugin_config_uri` field. PluginConfigDigest string `json:"pluginConfigDigest,omitempty"` // PluginConfigUri: URI of the plugin configuration stored in the Artifact // Registry. The configuration is provided to the plugin at runtime through the - // `ON_CONFIGURE` callback. The container image must contain only a single file - // with the name `plugin.config`. When a new `WasmPluginVersion` resource is - // created, the digest of the container image is saved in the - // `plugin_config_digest` field. + // `ON_CONFIGURE` callback. The URI can refer to one of the following + // repository formats: * Container images: the `plugin_config_uri` must point + // to a container that contains a single file with the name `plugin.config`. + // When a new `WasmPluginVersion` resource is created, the digest of the image + // is saved in the `plugin_config_digest` field. When pulling a container image + // from Artifact Registry, the digest value is used instead of an image tag. * + // Generic artifacts: the `plugin_config_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. The specified package and version + // must contain a file with the name `plugin.config`. When a new + // `WasmPluginVersion` resource is created, the checksum of the contents of the + // file is saved in the `plugin_config_digest` field. PluginConfigUri string `json:"pluginConfigUri,omitempty"` // UpdateTime: Output only. The timestamp when the resource was updated. UpdateTime string `json:"updateTime,omitempty"` @@ -4212,16 +4233,26 @@ type WasmPluginVersionDetails struct { CreateTime string `json:"createTime,omitempty"` // Description: Optional. A human-readable description of the resource. Description string `json:"description,omitempty"` - // ImageDigest: Output only. The resolved digest for the image specified in - // `image`. The digest is resolved during the creation of a `WasmPluginVersion` - // resource. This field holds the digest value regardless of whether a tag or - // digest was originally specified in the `image` field. + // ImageDigest: Output only. This field holds the digest (usually checksum) + // value for the plugin image. The value is calculated based on the `image_uri` + // field. If the `image_uri` field refers to a container image, the digest + // value is obtained from the container image. If the `image_uri` field refers + // to a generic artifact, the digest value is calculated based on the contents + // of the file. ImageDigest string `json:"imageDigest,omitempty"` - // ImageUri: Optional. URI of the container image containing the Wasm module, - // stored in the Artifact Registry. The container image must contain only a - // single file with the name `plugin.wasm`. When a new `WasmPluginVersion` - // resource is created, the URI gets resolved to an image digest and saved in - // the `image_digest` field. + // ImageUri: Optional. URI of the image containing the Wasm module, stored in + // Artifact Registry. The URI can refer to one of the following repository + // formats: * Container images: the `image_uri` must point to a container that + // contains a single file with the name `plugin.wasm`. When a new + // `WasmPluginVersion` resource is created, the digest of the image is saved in + // the `image_digest` field. When pulling a container image from Artifact + // Registry, the digest value is used instead of an image tag. * Generic + // artifacts: the `image_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. The specified package and version + // must contain a file with the name `plugin.wasm`. When a new + // `WasmPluginVersion` resource is created, the checksum of the contents of the + // file is saved in the `image_digest` field. ImageUri string `json:"imageUri,omitempty"` // Labels: Optional. Set of labels associated with the `WasmPluginVersion` // resource. @@ -4233,15 +4264,23 @@ type WasmPluginVersionDetails struct { PluginConfigData string `json:"pluginConfigData,omitempty"` // PluginConfigDigest: Output only. This field holds the digest (usually // checksum) value for the plugin configuration. The value is calculated based - // on the contents of the `plugin_config_data` field or the container image - // defined by the `plugin_config_uri` field. + // on the contents of `plugin_config_data` field or the image defined by the + // `plugin_config_uri` field. PluginConfigDigest string `json:"pluginConfigDigest,omitempty"` // PluginConfigUri: URI of the plugin configuration stored in the Artifact // Registry. The configuration is provided to the plugin at runtime through the - // `ON_CONFIGURE` callback. The container image must contain only a single file - // with the name `plugin.config`. When a new `WasmPluginVersion` resource is - // created, the digest of the container image is saved in the - // `plugin_config_digest` field. + // `ON_CONFIGURE` callback. The URI can refer to one of the following + // repository formats: * Container images: the `plugin_config_uri` must point + // to a container that contains a single file with the name `plugin.config`. + // When a new `WasmPluginVersion` resource is created, the digest of the image + // is saved in the `plugin_config_digest` field. When pulling a container image + // from Artifact Registry, the digest value is used instead of an image tag. * + // Generic artifacts: the `plugin_config_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. The specified package and version + // must contain a file with the name `plugin.config`. When a new + // `WasmPluginVersion` resource is created, the checksum of the contents of the + // file is saved in the `plugin_config_digest` field. PluginConfigUri string `json:"pluginConfigUri,omitempty"` // UpdateTime: Output only. The timestamp when the resource was updated. UpdateTime string `json:"updateTime,omitempty"` diff --git a/osconfig/v1/osconfig-api.json b/osconfig/v1/osconfig-api.json index a678003cb9..70d6b33b77 100644 --- a/osconfig/v1/osconfig-api.json +++ b/osconfig/v1/osconfig-api.json @@ -1083,7 +1083,7 @@ } } }, - "revision": "20250511", + "revision": "20250727", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "AptSettings": { @@ -3665,6 +3665,29 @@ "description": "This API resource represents the vulnerability report for a specified Compute Engine virtual machine (VM) instance at a given point in time. For more information, see [Vulnerability reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports).", "id": "VulnerabilityReport", "properties": { + "highestUpgradableCveSeverity": { + "description": "Output only. Highest level of severity among all the upgradable vulnerabilities with CVEs attached.", + "enum": [ + "VULNERABILITY_SEVERITY_LEVEL_UNSPECIFIED", + "NONE", + "MINIMAL", + "LOW", + "MEDIUM", + "HIGH", + "CRITICAL" + ], + "enumDescriptions": [ + "Default SeverityLevel. This value is unused.", + "Vulnerability has no severity level.", + "Vulnerability severity level is minimal. This is level below the low severity level.", + "Vulnerability severity level is low. This is level below the medium severity level.", + "Vulnerability severity level is medium. This is level below the high severity level.", + "Vulnerability severity level is high. This is level below the critical severity level.", + "Vulnerability severity level is critical. This is the highest severity level." + ], + "readOnly": true, + "type": "string" + }, "name": { "description": "Output only. The `vulnerabilityReport` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`", "readOnly": true, diff --git a/osconfig/v1/osconfig-gen.go b/osconfig/v1/osconfig-gen.go index f70ab67b95..80072dea9e 100644 --- a/osconfig/v1/osconfig-gen.go +++ b/osconfig/v1/osconfig-gen.go @@ -3461,6 +3461,24 @@ func (s TimeZone) MarshalJSON() ([]byte, error) { // point in time. For more information, see Vulnerability reports // (https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports). type VulnerabilityReport struct { + // HighestUpgradableCveSeverity: Output only. Highest level of severity among + // all the upgradable vulnerabilities with CVEs attached. + // + // Possible values: + // "VULNERABILITY_SEVERITY_LEVEL_UNSPECIFIED" - Default SeverityLevel. This + // value is unused. + // "NONE" - Vulnerability has no severity level. + // "MINIMAL" - Vulnerability severity level is minimal. This is level below + // the low severity level. + // "LOW" - Vulnerability severity level is low. This is level below the + // medium severity level. + // "MEDIUM" - Vulnerability severity level is medium. This is level below the + // high severity level. + // "HIGH" - Vulnerability severity level is high. This is level below the + // critical severity level. + // "CRITICAL" - Vulnerability severity level is critical. This is the highest + // severity level. + HighestUpgradableCveSeverity string `json:"highestUpgradableCveSeverity,omitempty"` // Name: Output only. The `vulnerabilityReport` API resource name. Format: // `projects/{project_number}/locations/{location}/instances/{instance_id}/vulne // rabilityReport` @@ -3473,15 +3491,15 @@ type VulnerabilityReport struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. + // ForceSendFields is a list of field names (e.g. + // "HighestUpgradableCveSeverity") 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. "Name") 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. "HighestUpgradableCveSeverity") 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/osconfig/v1alpha/osconfig-api.json b/osconfig/v1alpha/osconfig-api.json index 61d201fec9..e729e5a2c7 100644 --- a/osconfig/v1alpha/osconfig-api.json +++ b/osconfig/v1alpha/osconfig-api.json @@ -707,7 +707,7 @@ } } }, - "revision": "20250511", + "revision": "20250727", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "CVSSv3": { @@ -2720,6 +2720,29 @@ "description": "This API resource represents the vulnerability report for a specified Compute Engine virtual machine (VM) instance at a given point in time. For more information, see [Vulnerability reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports).", "id": "VulnerabilityReport", "properties": { + "highestUpgradableCveSeverity": { + "description": "Output only. Highest level of severity among all the upgradable vulnerabilities with CVEs attached.", + "enum": [ + "VULNERABILITY_SEVERITY_LEVEL_UNSPECIFIED", + "NONE", + "MINIMAL", + "LOW", + "MEDIUM", + "HIGH", + "CRITICAL" + ], + "enumDescriptions": [ + "Default SeverityLevel. This value is unused.", + "Vulnerability has no severity level.", + "Vulnerability severity level is minimal. This is level below the low severity level.", + "Vulnerability severity level is low. This is level below the medium severity level.", + "Vulnerability severity level is medium. This is level below the high severity level.", + "Vulnerability severity level is high. This is level below the critical severity level.", + "Vulnerability severity level is critical. This is the highest severity level." + ], + "readOnly": true, + "type": "string" + }, "name": { "description": "Output only. The `vulnerabilityReport` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`", "readOnly": true, diff --git a/osconfig/v1alpha/osconfig-gen.go b/osconfig/v1alpha/osconfig-gen.go index c373543440..4b161feede 100644 --- a/osconfig/v1alpha/osconfig-gen.go +++ b/osconfig/v1alpha/osconfig-gen.go @@ -2777,6 +2777,24 @@ func (s StatusProto) MarshalJSON() ([]byte, error) { // point in time. For more information, see Vulnerability reports // (https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports). type VulnerabilityReport struct { + // HighestUpgradableCveSeverity: Output only. Highest level of severity among + // all the upgradable vulnerabilities with CVEs attached. + // + // Possible values: + // "VULNERABILITY_SEVERITY_LEVEL_UNSPECIFIED" - Default SeverityLevel. This + // value is unused. + // "NONE" - Vulnerability has no severity level. + // "MINIMAL" - Vulnerability severity level is minimal. This is level below + // the low severity level. + // "LOW" - Vulnerability severity level is low. This is level below the + // medium severity level. + // "MEDIUM" - Vulnerability severity level is medium. This is level below the + // high severity level. + // "HIGH" - Vulnerability severity level is high. This is level below the + // critical severity level. + // "CRITICAL" - Vulnerability severity level is critical. This is the highest + // severity level. + HighestUpgradableCveSeverity string `json:"highestUpgradableCveSeverity,omitempty"` // Name: Output only. The `vulnerabilityReport` API resource name. Format: // `projects/{project_number}/locations/{location}/instances/{instance_id}/vulne // rabilityReport` @@ -2789,15 +2807,15 @@ type VulnerabilityReport struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. + // ForceSendFields is a list of field names (e.g. + // "HighestUpgradableCveSeverity") 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. "Name") 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. "HighestUpgradableCveSeverity") 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/redis/v1/redis-api.json b/redis/v1/redis-api.json index d61f83a5ff..92f2b05936 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -1073,7 +1073,7 @@ } } }, - "revision": "20250718", + "revision": "20250729", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1378,6 +1378,38 @@ }, "type": "object" }, + "BackupDRMetadata": { + "description": "BackupDRMetadata contains information about the backup and disaster recovery metadata of a database resource.", + "id": "BackupDRMetadata", + "properties": { + "backupConfiguration": { + "$ref": "BackupConfiguration", + "description": "Backup configuration for this instance." + }, + "backupRun": { + "$ref": "BackupRun", + "description": "Latest backup run information for this instance." + }, + "backupdrConfiguration": { + "$ref": "BackupDRConfiguration", + "description": "BackupDR configuration for this instance." + }, + "fullResourceName": { + "description": "Required. Full resource name of this instance.", + "type": "string" + }, + "lastRefreshTime": { + "description": "Required. Last time backup configuration was refreshed.", + "format": "google-datetime", + "type": "string" + }, + "resourceId": { + "$ref": "DatabaseResourceId", + "description": "Required. Database resource id." + } + }, + "type": "object" + }, "BackupFile": { "description": "Backup is consisted of multiple backup files.", "id": "BackupFile", @@ -1961,9 +1993,13 @@ "type": "object" }, "DatabaseResourceFeed": { - "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. Next ID: 9", + "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. Next ID: 10", "id": "DatabaseResourceFeed", "properties": { + "backupdrMetadata": { + "$ref": "BackupDRMetadata", + "description": "BackupDR metadata is used to ingest metadata from BackupDR." + }, "configBasedSignalData": { "$ref": "ConfigBasedSignalData", "description": "Config based signal data is used to ingest signals that are generated based on the configuration of the database resource." @@ -1981,7 +2017,8 @@ "OBSERVABILITY_DATA", "SECURITY_FINDING_DATA", "RECOMMENDATION_SIGNAL_DATA", - "CONFIG_BASED_SIGNAL_DATA" + "CONFIG_BASED_SIGNAL_DATA", + "BACKUPDR_METADATA" ], "enumDescriptions": [ "", @@ -1989,7 +2026,8 @@ "Database resource monitoring data", "Database resource security health signal data", "Database resource recommendation signal data", - "Database config based signal data" + "Database config based signal data", + "Database resource metadata from BackupDR" ], "type": "string" }, @@ -2226,7 +2264,9 @@ "SIGNAL_TYPE_LOCATION_ORG_POLICY_NOT_SATISFIED", "SIGNAL_TYPE_OUTDATED_MINOR_VERSION", "SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED", - "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS" + "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS", + "SIGNAL_TYPE_REPLICATION_LAG", + "SIGNAL_TYPE_OUTDATED_VERSION" ], "enumDeprecated": [ false, @@ -2327,6 +2367,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -2428,7 +2470,9 @@ "Location org policy not satisfied.", "Outdated DB minor version.", "Schema not optimized.", - "High number of idle connections." + "High number of idle connections.", + "Replication delay.", + "Outdated version." ], "type": "string" }, @@ -2853,7 +2897,9 @@ "SIGNAL_TYPE_LOCATION_ORG_POLICY_NOT_SATISFIED", "SIGNAL_TYPE_OUTDATED_MINOR_VERSION", "SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED", - "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS" + "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS", + "SIGNAL_TYPE_REPLICATION_LAG", + "SIGNAL_TYPE_OUTDATED_VERSION" ], "enumDeprecated": [ false, @@ -2954,6 +3000,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -3055,7 +3103,9 @@ "Location org policy not satisfied.", "Outdated DB minor version.", "Schema not optimized.", - "High number of idle connections." + "High number of idle connections.", + "Replication delay.", + "Outdated version." ], "type": "string" } diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 76334c7e37..2dcc5c09c2 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -541,6 +541,39 @@ func (s BackupDRConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BackupDRMetadata: BackupDRMetadata contains information about the backup and +// disaster recovery metadata of a database resource. +type BackupDRMetadata struct { + // BackupConfiguration: Backup configuration for this instance. + BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` + // BackupRun: Latest backup run information for this instance. + BackupRun *BackupRun `json:"backupRun,omitempty"` + // BackupdrConfiguration: BackupDR configuration for this instance. + BackupdrConfiguration *BackupDRConfiguration `json:"backupdrConfiguration,omitempty"` + // FullResourceName: Required. Full resource name of this instance. + FullResourceName string `json:"fullResourceName,omitempty"` + // LastRefreshTime: Required. Last time backup configuration was refreshed. + LastRefreshTime string `json:"lastRefreshTime,omitempty"` + // ResourceId: Required. Database resource id. + ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 BackupDRMetadata) MarshalJSON() ([]byte, error) { + type NoMethod BackupDRMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BackupFile: Backup is consisted of multiple backup files. type BackupFile struct { // CreateTime: Output only. The time when the backup file was created. @@ -1156,8 +1189,11 @@ func (s CustomMetadataData) MarshalJSON() ([]byte, error) { // DatabaseResourceFeed: DatabaseResourceFeed is the top level proto to be used // to ingest different database resource level events into Condor platform. -// Next ID: 9 +// Next ID: 10 type DatabaseResourceFeed struct { + // BackupdrMetadata: BackupDR metadata is used to ingest metadata from + // BackupDR. + BackupdrMetadata *BackupDRMetadata `json:"backupdrMetadata,omitempty"` // ConfigBasedSignalData: Config based signal data is used to ingest signals // that are generated based on the configuration of the database resource. ConfigBasedSignalData *ConfigBasedSignalData `json:"configBasedSignalData,omitempty"` @@ -1173,6 +1209,7 @@ type DatabaseResourceFeed struct { // "RECOMMENDATION_SIGNAL_DATA" - Database resource recommendation signal // data // "CONFIG_BASED_SIGNAL_DATA" - Database config based signal data + // "BACKUPDR_METADATA" - Database resource metadata from BackupDR FeedType string `json:"feedType,omitempty"` ObservabilityMetricData *ObservabilityMetricData `json:"observabilityMetricData,omitempty"` RecommendationSignalData *DatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"` @@ -1181,15 +1218,15 @@ type DatabaseResourceFeed struct { // available in individual feed level as well. ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` ResourceMetadata *DatabaseResourceMetadata `json:"resourceMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfigBasedSignalData") to + // ForceSendFields is a list of field names (e.g. "BackupdrMetadata") 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. "ConfigBasedSignalData") 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. "BackupdrMetadata") 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:"-"` } @@ -1507,6 +1544,8 @@ type DatabaseResourceHealthSignalData struct { // "SIGNAL_TYPE_OUTDATED_MINOR_VERSION" - Outdated DB minor version. // "SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED" - Schema not optimized. // "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS" - High number of idle connections. + // "SIGNAL_TYPE_REPLICATION_LAG" - Replication delay. + // "SIGNAL_TYPE_OUTDATED_VERSION" - Outdated version. SignalType string `json:"signalType,omitempty"` // Possible values: // "STATE_UNSPECIFIED" - Unspecified state. @@ -1996,6 +2035,8 @@ type DatabaseResourceRecommendationSignalData struct { // "SIGNAL_TYPE_OUTDATED_MINOR_VERSION" - Outdated DB minor version. // "SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED" - Schema not optimized. // "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS" - High number of idle connections. + // "SIGNAL_TYPE_REPLICATION_LAG" - Replication delay. + // "SIGNAL_TYPE_OUTDATED_VERSION" - Outdated version. SignalType string `json:"signalType,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalMetadata") to // unconditionally include in API requests. By default, fields with empty or diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index b6c878ecf4..41e33d8a4f 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -1073,7 +1073,7 @@ } } }, - "revision": "20250718", + "revision": "20250729", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1378,6 +1378,38 @@ }, "type": "object" }, + "BackupDRMetadata": { + "description": "BackupDRMetadata contains information about the backup and disaster recovery metadata of a database resource.", + "id": "BackupDRMetadata", + "properties": { + "backupConfiguration": { + "$ref": "BackupConfiguration", + "description": "Backup configuration for this instance." + }, + "backupRun": { + "$ref": "BackupRun", + "description": "Latest backup run information for this instance." + }, + "backupdrConfiguration": { + "$ref": "BackupDRConfiguration", + "description": "BackupDR configuration for this instance." + }, + "fullResourceName": { + "description": "Required. Full resource name of this instance.", + "type": "string" + }, + "lastRefreshTime": { + "description": "Required. Last time backup configuration was refreshed.", + "format": "google-datetime", + "type": "string" + }, + "resourceId": { + "$ref": "DatabaseResourceId", + "description": "Required. Database resource id." + } + }, + "type": "object" + }, "BackupFile": { "description": "Backup is consisted of multiple backup files.", "id": "BackupFile", @@ -1961,9 +1993,13 @@ "type": "object" }, "DatabaseResourceFeed": { - "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. Next ID: 9", + "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. Next ID: 10", "id": "DatabaseResourceFeed", "properties": { + "backupdrMetadata": { + "$ref": "BackupDRMetadata", + "description": "BackupDR metadata is used to ingest metadata from BackupDR." + }, "configBasedSignalData": { "$ref": "ConfigBasedSignalData", "description": "Config based signal data is used to ingest signals that are generated based on the configuration of the database resource." @@ -1981,7 +2017,8 @@ "OBSERVABILITY_DATA", "SECURITY_FINDING_DATA", "RECOMMENDATION_SIGNAL_DATA", - "CONFIG_BASED_SIGNAL_DATA" + "CONFIG_BASED_SIGNAL_DATA", + "BACKUPDR_METADATA" ], "enumDescriptions": [ "", @@ -1989,7 +2026,8 @@ "Database resource monitoring data", "Database resource security health signal data", "Database resource recommendation signal data", - "Database config based signal data" + "Database config based signal data", + "Database resource metadata from BackupDR" ], "type": "string" }, @@ -2226,7 +2264,9 @@ "SIGNAL_TYPE_LOCATION_ORG_POLICY_NOT_SATISFIED", "SIGNAL_TYPE_OUTDATED_MINOR_VERSION", "SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED", - "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS" + "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS", + "SIGNAL_TYPE_REPLICATION_LAG", + "SIGNAL_TYPE_OUTDATED_VERSION" ], "enumDeprecated": [ false, @@ -2327,6 +2367,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -2428,7 +2470,9 @@ "Location org policy not satisfied.", "Outdated DB minor version.", "Schema not optimized.", - "High number of idle connections." + "High number of idle connections.", + "Replication delay.", + "Outdated version." ], "type": "string" }, @@ -2853,7 +2897,9 @@ "SIGNAL_TYPE_LOCATION_ORG_POLICY_NOT_SATISFIED", "SIGNAL_TYPE_OUTDATED_MINOR_VERSION", "SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED", - "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS" + "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS", + "SIGNAL_TYPE_REPLICATION_LAG", + "SIGNAL_TYPE_OUTDATED_VERSION" ], "enumDeprecated": [ false, @@ -2954,6 +3000,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -3055,7 +3103,9 @@ "Location org policy not satisfied.", "Outdated DB minor version.", "Schema not optimized.", - "High number of idle connections." + "High number of idle connections.", + "Replication delay.", + "Outdated version." ], "type": "string" } diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index d62fa624ad..ea776e7ce3 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -541,6 +541,39 @@ func (s BackupDRConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BackupDRMetadata: BackupDRMetadata contains information about the backup and +// disaster recovery metadata of a database resource. +type BackupDRMetadata struct { + // BackupConfiguration: Backup configuration for this instance. + BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` + // BackupRun: Latest backup run information for this instance. + BackupRun *BackupRun `json:"backupRun,omitempty"` + // BackupdrConfiguration: BackupDR configuration for this instance. + BackupdrConfiguration *BackupDRConfiguration `json:"backupdrConfiguration,omitempty"` + // FullResourceName: Required. Full resource name of this instance. + FullResourceName string `json:"fullResourceName,omitempty"` + // LastRefreshTime: Required. Last time backup configuration was refreshed. + LastRefreshTime string `json:"lastRefreshTime,omitempty"` + // ResourceId: Required. Database resource id. + ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 BackupDRMetadata) MarshalJSON() ([]byte, error) { + type NoMethod BackupDRMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BackupFile: Backup is consisted of multiple backup files. type BackupFile struct { // CreateTime: Output only. The time when the backup file was created. @@ -1156,8 +1189,11 @@ func (s CustomMetadataData) MarshalJSON() ([]byte, error) { // DatabaseResourceFeed: DatabaseResourceFeed is the top level proto to be used // to ingest different database resource level events into Condor platform. -// Next ID: 9 +// Next ID: 10 type DatabaseResourceFeed struct { + // BackupdrMetadata: BackupDR metadata is used to ingest metadata from + // BackupDR. + BackupdrMetadata *BackupDRMetadata `json:"backupdrMetadata,omitempty"` // ConfigBasedSignalData: Config based signal data is used to ingest signals // that are generated based on the configuration of the database resource. ConfigBasedSignalData *ConfigBasedSignalData `json:"configBasedSignalData,omitempty"` @@ -1173,6 +1209,7 @@ type DatabaseResourceFeed struct { // "RECOMMENDATION_SIGNAL_DATA" - Database resource recommendation signal // data // "CONFIG_BASED_SIGNAL_DATA" - Database config based signal data + // "BACKUPDR_METADATA" - Database resource metadata from BackupDR FeedType string `json:"feedType,omitempty"` ObservabilityMetricData *ObservabilityMetricData `json:"observabilityMetricData,omitempty"` RecommendationSignalData *DatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"` @@ -1181,15 +1218,15 @@ type DatabaseResourceFeed struct { // available in individual feed level as well. ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` ResourceMetadata *DatabaseResourceMetadata `json:"resourceMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfigBasedSignalData") to + // ForceSendFields is a list of field names (e.g. "BackupdrMetadata") 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. "ConfigBasedSignalData") 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. "BackupdrMetadata") 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:"-"` } @@ -1507,6 +1544,8 @@ type DatabaseResourceHealthSignalData struct { // "SIGNAL_TYPE_OUTDATED_MINOR_VERSION" - Outdated DB minor version. // "SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED" - Schema not optimized. // "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS" - High number of idle connections. + // "SIGNAL_TYPE_REPLICATION_LAG" - Replication delay. + // "SIGNAL_TYPE_OUTDATED_VERSION" - Outdated version. SignalType string `json:"signalType,omitempty"` // Possible values: // "STATE_UNSPECIFIED" - Unspecified state. @@ -1996,6 +2035,8 @@ type DatabaseResourceRecommendationSignalData struct { // "SIGNAL_TYPE_OUTDATED_MINOR_VERSION" - Outdated DB minor version. // "SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED" - Schema not optimized. // "SIGNAL_TYPE_MANY_IDLE_CONNECTIONS" - High number of idle connections. + // "SIGNAL_TYPE_REPLICATION_LAG" - Replication delay. + // "SIGNAL_TYPE_OUTDATED_VERSION" - Outdated version. SignalType string `json:"signalType,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalMetadata") to // unconditionally include in API requests. By default, fields with empty or diff --git a/securesourcemanager/v1/securesourcemanager-api.json b/securesourcemanager/v1/securesourcemanager-api.json new file mode 100644 index 0000000000..6d88a5fb01 --- /dev/null +++ b/securesourcemanager/v1/securesourcemanager-api.json @@ -0,0 +1,3568 @@ +{ + "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://securesourcemanager.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Secure Source Manager", + "description": "Regionally deployed, single-tenant managed source code repository hosted on Google Cloud.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/secure-source-manager", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://securesourcemanager.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://securesourcemanager.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://securesourcemanager.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://securesourcemanager.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://securesourcemanager.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://securesourcemanager.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://securesourcemanager.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://securesourcemanager.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://securesourcemanager.us-central1.rep.googleapis.com/", + "location": "us-central1" + } + ], + "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": "securesourcemanager:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://securesourcemanager.mtls.googleapis.com/", + "name": "securesourcemanager", + "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": "securesourcemanager.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": "securesourcemanager.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "extraLocationTypes": { + "description": "Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.", + "location": "query", + "repeated": true, + "type": "string" + }, + "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": { + "instances": { + "methods": { + "create": { + "description": "Creates a new instance in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.instances.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instanceId": { + "description": "Required. ID of the instance to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/instances", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + "httpMethod": "DELETE", + "id": "securesourcemanager.projects.locations.instances.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.instances.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Instance" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:getIamPolicy", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.instances.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Instances in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.instances.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filter for filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListInstancesRequest.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/instances", + "response": { + "$ref": "ListInstancesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:setIamPolicy", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.instances.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:testIamPermissions", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.instances.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "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": "securesourcemanager.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "securesourcemanager.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "securesourcemanager.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": "securesourcemanager.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" + ] + } + } + }, + "repositories": { + "methods": { + "create": { + "description": "Creates a new repository in a given project and location. The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com endpoint.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project in which to create the repository. Values are of the form `projects/{project_number}/locations/{location_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "repositoryId": { + "description": "Required. The ID to use for the repository, which will become the final component of the repository's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/repositories", + "request": { + "$ref": "Repository" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}", + "httpMethod": "DELETE", + "id": "securesourcemanager.projects.locations.repositories.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the repository is not found, the request will succeed but no action will be taken on the server.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the repository to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "fetchBlob": { + "description": "Fetches a blob from a repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:fetchBlob", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.fetchBlob", + "parameterOrder": [ + "repository" + ], + "parameters": { + "repository": { + "description": "Required. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. Specifies the repository containing the blob.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + }, + "sha": { + "description": "Required. The SHA-1 hash of the blob to retrieve.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+repository}:fetchBlob", + "response": { + "$ref": "FetchBlobResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "fetchTree": { + "description": "Fetches a tree from a repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:fetchTree", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.fetchTree", + "parameterOrder": [ + "repository" + ], + "parameters": { + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, at most 10,000 items will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "recursive": { + "description": "Optional. If true, include all subfolders and their files in the response. If false, only the immediate children are returned.", + "location": "query", + "type": "boolean" + }, + "ref": { + "description": "Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies which tree to fetch. If not specified, the default branch will be used.", + "location": "query", + "type": "string" + }, + "repository": { + "description": "Required. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. Specifies the repository to fetch the tree from.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+repository}:fetchTree", + "response": { + "$ref": "FetchTreeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets metadata of a repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the repository to retrieve. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Repository" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Get IAM policy for a repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:getIamPolicy", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Repositories in a given project and location. The instance field is required in the query parameter for requests using the securesourcemanager.googleapis.com endpoint.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter results.", + "location": "query", + "type": "string" + }, + "instance": { + "description": "Optional. The name of the instance in which the repository is hosted, formatted as `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. When listing repositories via securesourcemanager.googleapis.com, this field is required. When listing repositories via *.sourcemanager.dev, this field is ignored.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListRepositoriesRequest.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/repositories", + "response": { + "$ref": "ListRepositoriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the metadata of a repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}", + "httpMethod": "PATCH", + "id": "securesourcemanager.projects.locations.repositories.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. A unique identifier for a repository. The name should be of the format: `projects/{project}/locations/{location_id}/repositories/{repository_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the repository 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" + }, + "validateOnly": { + "description": "Optional. False by default. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Repository" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Set IAM policy on a repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:setIamPolicy", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Test IAM permissions on a repository. IAM permission checks are not required on this method.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:testIamPermissions", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "branchRules": { + "methods": { + "create": { + "description": "CreateBranchRule creates a branch rule in a given repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/branchRules", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.branchRules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "branchRuleId": { + "location": "query", + "type": "string" + }, + "parent": { + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/branchRules", + "request": { + "$ref": "BranchRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "DeleteBranchRule deletes a branch rule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/branchRules/{branchRulesId}", + "httpMethod": "DELETE", + "id": "securesourcemanager.projects.locations.repositories.branchRules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the branch rule is not found, the request will succeed but no action will be taken on the server.", + "location": "query", + "type": "boolean" + }, + "name": { + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "GetBranchRule gets a branch rule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/branchRules/{branchRulesId}", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.branchRules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the repository to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "BranchRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListBranchRules lists branch rules in a given repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/branchRules", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.branchRules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "location": "query", + "type": "string" + }, + "parent": { + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/branchRules", + "response": { + "$ref": "ListBranchRulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "UpdateBranchRule updates a branch rule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/branchRules/{branchRulesId}", + "httpMethod": "PATCH", + "id": "securesourcemanager.projects.locations.repositories.branchRules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. A unique identifier for a BranchRule. The name should be of the format: `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the branchRule 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. The special value \"*\" means full replacement.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually post it. (https://google.aip.dev/163, for declarative friendly)", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "BranchRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "hooks": { + "methods": { + "create": { + "description": "Creates a new hook in a given repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/hooks", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.hooks.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "hookId": { + "description": "Required. The ID to use for the hook, which will become the final component of the hook's resource name. This value restricts to lower-case 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 repository in which to create the hook. Values are of the form `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/hooks", + "request": { + "$ref": "Hook" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Hook.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/hooks/{hooksId}", + "httpMethod": "DELETE", + "id": "securesourcemanager.projects.locations.repositories.hooks.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the hook to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets metadata of a hook.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/hooks/{hooksId}", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.hooks.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the hook to retrieve. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Hook" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists hooks in a given repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/hooks", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.hooks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListHooksRequest.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/hooks", + "response": { + "$ref": "ListHooksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the metadata of a hook.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/hooks/{hooksId}", + "httpMethod": "PATCH", + "id": "securesourcemanager.projects.locations.repositories.hooks.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. A unique identifier for a Hook. The name should be of the format: `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the hook 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. The special value \"*\" means full replacement.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Hook" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "issues": { + "methods": { + "close": { + "description": "Closes an issue.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}:close", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.issues.close", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the issue to close. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:close", + "request": { + "$ref": "CloseIssueRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates an issue.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.issues.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The repository in which to create the issue. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/issues", + "request": { + "$ref": "Issue" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an issue.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}", + "httpMethod": "DELETE", + "id": "securesourcemanager.projects.locations.repositories.issues.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the issue. If the etag is provided and does not match the current etag of the issue, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Name of the issue to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets an issue.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.issues.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the issue to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Issue" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists issues in a repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.issues.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Used to filter the resulting issues list.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The repository in which to list issues. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/issues", + "response": { + "$ref": "ListIssuesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "open": { + "description": "Opens an issue.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}:open", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.issues.open", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the issue to open. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:open", + "request": { + "$ref": "OpenIssueRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a issue.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}", + "httpMethod": "PATCH", + "id": "securesourcemanager.projects.locations.repositories.issues.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Unique identifier for an issue. The issue id is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the issue 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. The special value \"*\" means full replacement.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Issue" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "issueComments": { + "methods": { + "create": { + "description": "Creates an issue comment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}/issueComments", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.issues.issueComments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The issue in which to create the issue comment. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/issueComments", + "request": { + "$ref": "IssueComment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an issue comment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}/issueComments/{issueCommentsId}", + "httpMethod": "DELETE", + "id": "securesourcemanager.projects.locations.repositories.issues.issueComments.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the issue comment to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets an issue comment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}/issueComments/{issueCommentsId}", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.issues.issueComments.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the issue comment to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "IssueComment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists comments in an issue.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}/issueComments", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.issues.issueComments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The issue in which to list the comments. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/issueComments", + "response": { + "$ref": "ListIssueCommentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an issue comment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/issues/{issuesId}/issueComments/{issueCommentsId}", + "httpMethod": "PATCH", + "id": "securesourcemanager.projects.locations.repositories.issues.issueComments.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Unique identifier for an issue comment. The comment id is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the issue comment 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. The special value \"*\" means full replacement.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "IssueComment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "pullRequests": { + "methods": { + "close": { + "description": "Closes a pull request without merging.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}:close", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.close", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The pull request to close. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:close", + "request": { + "$ref": "ClosePullRequestRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a pull request.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The repository that the pull request is created from. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/pullRequests", + "request": { + "$ref": "PullRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a pull request.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the pull request to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "PullRequest" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists pull requests in a repository.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The repository in which to list pull requests. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/pullRequests", + "response": { + "$ref": "ListPullRequestsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listFileDiffs": { + "description": "Lists a pull request's file diffs.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}:listFileDiffs", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.listFileDiffs", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The pull request to list file diffs for. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}:listFileDiffs", + "response": { + "$ref": "ListPullRequestFileDiffsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "merge": { + "description": "Merges a pull request.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}:merge", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.merge", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The pull request to merge. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:merge", + "request": { + "$ref": "MergePullRequestRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "open": { + "description": "Opens a pull request.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}:open", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.open", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The pull request to open. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:open", + "request": { + "$ref": "OpenPullRequestRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a pull request.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}", + "httpMethod": "PATCH", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. A unique identifier for a PullRequest. The number appended at the end is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the pull request 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. The special value \"*\" means full replacement.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "PullRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "pullRequestComments": { + "methods": { + "batchCreate": { + "description": "Batch creates pull request comments.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}/pullRequestComments:batchCreate", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The pull request in which to create the pull request comments. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/pullRequestComments:batchCreate", + "request": { + "$ref": "BatchCreatePullRequestCommentsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a pull request comment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}/pullRequestComments", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The pull request in which to create the pull request comment. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/pullRequestComments", + "request": { + "$ref": "PullRequestComment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a pull request comment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}/pullRequestComments/{pullRequestCommentsId}", + "httpMethod": "DELETE", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the pull request comment to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a pull request comment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}/pullRequestComments/{pullRequestCommentsId}", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the pull request comment to retrieve. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "PullRequestComment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists pull request comments.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}/pullRequestComments", + "httpMethod": "GET", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Requested page size. If unspecified, at most 100 pull request comments will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The pull request in which to list pull request comments. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/pullRequestComments", + "response": { + "$ref": "ListPullRequestCommentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a pull request comment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}/pullRequestComments/{pullRequestCommentsId}", + "httpMethod": "PATCH", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Unique identifier for the pull request comment. The comment id is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the pull request comment resource by the update. Updatable fields are `body`.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "PullRequestComment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resolve": { + "description": "Resolves pull request comments.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}/pullRequestComments:resolve", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.resolve", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The pull request in which to resolve the pull request comments. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/pullRequestComments:resolve", + "request": { + "$ref": "ResolvePullRequestCommentsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "unresolve": { + "description": "Unresolves pull request comment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/pullRequests/{pullRequestsId}/pullRequestComments:unresolve", + "httpMethod": "POST", + "id": "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.unresolve", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The pull request in which to resolve the pull request comments. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/pullRequestComments:unresolve", + "request": { + "$ref": "UnresolvePullRequestCommentsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "revision": "0", + "rootUrl": "https://securesourcemanager.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "BatchCreatePullRequestCommentsRequest": { + "description": "The request to batch create pull request comments.", + "id": "BatchCreatePullRequestCommentsRequest", + "properties": { + "requests": { + "description": "Required. The request message specifying the resources to create. There should be exactly one CreatePullRequestCommentRequest with CommentDetail being REVIEW in the list, and no more than 100 CreatePullRequestCommentRequests with CommentDetail being CODE in the list", + "items": { + "$ref": "CreatePullRequestCommentRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", + "type": "string" + } + }, + "type": "object" + }, + "Branch": { + "description": "Branch represents a branch involved in a pull request.", + "id": "Branch", + "properties": { + "ref": { + "description": "Required. Name of the branch.", + "type": "string" + }, + "sha": { + "description": "Output only. The commit at the tip of the branch.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BranchRule": { + "description": "Metadata of a BranchRule. BranchRule is the protection rule to enforce pre-defined rules on designated branches within a repository.", + "id": "BranchRule", + "properties": { + "allowStaleReviews": { + "description": "Optional. Determines if allow stale reviews or approvals before merging to the branch.", + "type": "boolean" + }, + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.", + "type": "object" + }, + "createTime": { + "description": "Output only. Create timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "disabled": { + "description": "Optional. Determines if the branch rule is disabled or not.", + "type": "boolean" + }, + "etag": { + "description": "Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "includePattern": { + "description": "Optional. The pattern of the branch that can match to this BranchRule. Specified as regex. .* for all branches. Examples: main, (main|release.*). Current MVP phase only support `.*` for wildcard.", + "type": "string" + }, + "minimumApprovalsCount": { + "description": "Optional. The minimum number of approvals required for the branch rule to be matched.", + "format": "int32", + "type": "integer" + }, + "minimumReviewsCount": { + "description": "Optional. The minimum number of reviews required for the branch rule to be matched.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Optional. A unique identifier for a BranchRule. The name should be of the format: `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`", + "type": "string" + }, + "requireCommentsResolved": { + "description": "Optional. Determines if require comments resolved before merging to the branch.", + "type": "boolean" + }, + "requireLinearHistory": { + "description": "Optional. Determines if require linear history before merging to the branch.", + "type": "boolean" + }, + "requirePullRequest": { + "description": "Optional. Determines if the branch rule requires a pull request or not.", + "type": "boolean" + }, + "requiredStatusChecks": { + "description": "Optional. List of required status checks before merging to the branch.", + "items": { + "$ref": "Check" + }, + "type": "array" + }, + "uid": { + "description": "Output only. Unique identifier of the repository.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "Check": { + "description": "Check is a type for status check.", + "id": "Check", + "properties": { + "context": { + "description": "Required. The context of the check.", + "type": "string" + } + }, + "type": "object" + }, + "CloseIssueRequest": { + "description": "The request to close an issue.", + "id": "CloseIssueRequest", + "properties": { + "etag": { + "description": "Optional. The current etag of the issue. If the etag is provided and does not match the current etag of the issue, closing will be blocked and an ABORTED error will be returned.", + "type": "string" + } + }, + "type": "object" + }, + "ClosePullRequestRequest": { + "description": "ClosePullRequestRequest is the request to close a pull request.", + "id": "ClosePullRequestRequest", + "properties": {}, + "type": "object" + }, + "Code": { + "description": "The comment on a code line.", + "id": "Code", + "properties": { + "body": { + "description": "Required. The comment body.", + "type": "string" + }, + "effectiveCommitSha": { + "description": "Output only. The effective commit sha this code comment is pointing to.", + "readOnly": true, + "type": "string" + }, + "effectiveRootComment": { + "description": "Output only. The root comment of the conversation, derived from the reply field.", + "readOnly": true, + "type": "string" + }, + "position": { + "$ref": "Position", + "description": "Optional. The position of the comment." + }, + "reply": { + "description": "Optional. Input only. The PullRequestComment resource name that this comment is replying to.", + "type": "string" + }, + "resolved": { + "description": "Output only. Boolean indicator if the comment is resolved.", + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, + "Comment": { + "description": "The general pull request comment.", + "id": "Comment", + "properties": { + "body": { + "description": "Required. The comment body.", + "type": "string" + } + }, + "type": "object" + }, + "CreatePullRequestCommentRequest": { + "description": "The request to create a pull request comment.", + "id": "CreatePullRequestCommentRequest", + "properties": { + "parent": { + "description": "Required. The pull request in which to create the pull request comment. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`", + "type": "string" + }, + "pullRequestComment": { + "$ref": "PullRequestComment", + "description": "Required. The pull request comment to create." + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "FetchBlobResponse": { + "description": "Response message containing the content of a blob.", + "id": "FetchBlobResponse", + "properties": { + "content": { + "description": "The content of the blob, encoded as base64.", + "type": "string" + }, + "sha": { + "description": "The SHA-1 hash of the blob.", + "type": "string" + } + }, + "type": "object" + }, + "FetchTreeResponse": { + "description": "Response message containing a list of TreeEntry objects.", + "id": "FetchTreeResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "treeEntries": { + "description": "The list of TreeEntry objects.", + "items": { + "$ref": "TreeEntry" + }, + "type": "array" + } + }, + "type": "object" + }, + "FileDiff": { + "description": "Metadata of a FileDiff. FileDiff represents a single file diff in a pull request.", + "id": "FileDiff", + "properties": { + "action": { + "description": "Output only. The action taken on the file (eg. added, modified, deleted).", + "enum": [ + "ACTION_UNSPECIFIED", + "ADDED", + "MODIFIED", + "DELETED" + ], + "enumDescriptions": [ + "Unspecified.", + "The file was added.", + "The file was modified.", + "The file was deleted." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The name of the file.", + "readOnly": true, + "type": "string" + }, + "patch": { + "description": "Output only. The git patch containing the file changes.", + "readOnly": true, + "type": "string" + }, + "sha": { + "description": "Output only. The commit pointing to the file changes.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Hook": { + "description": "Metadata of a Secure Source Manager Hook.", + "id": "Hook", + "properties": { + "createTime": { + "description": "Output only. Create timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "disabled": { + "description": "Optional. Determines if the hook disabled or not. Set to true to stop sending traffic.", + "type": "boolean" + }, + "events": { + "description": "Optional. The events that trigger hook on.", + "items": { + "enum": [ + "UNSPECIFIED", + "PUSH", + "PULL_REQUEST" + ], + "enumDescriptions": [ + "Unspecified.", + "Push events are triggered when pushing to the repository.", + "Pull request events are triggered when a pull request is opened, closed, reopened, or edited." + ], + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Identifier. A unique identifier for a Hook. The name should be of the format: `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`", + "type": "string" + }, + "pushOption": { + "$ref": "PushOption", + "description": "Optional. The trigger option for push events." + }, + "sensitiveQueryString": { + "description": "Optional. The sensitive query string to be appended to the target URI.", + "type": "string" + }, + "targetUri": { + "description": "Required. The target URI to which the payloads will be delivered.", + "type": "string" + }, + "uid": { + "description": "Output only. Unique identifier of the hook.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "HostConfig": { + "description": "HostConfig has different instance endpoints.", + "id": "HostConfig", + "properties": { + "api": { + "description": "Output only. API hostname.", + "readOnly": true, + "type": "string" + }, + "gitHttp": { + "description": "Output only. Git HTTP hostname.", + "readOnly": true, + "type": "string" + }, + "gitSsh": { + "description": "Output only. Git SSH hostname.", + "readOnly": true, + "type": "string" + }, + "html": { + "description": "Output only. HTML hostname.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "InitialConfig": { + "description": "Repository initialization configuration.", + "id": "InitialConfig", + "properties": { + "defaultBranch": { + "description": "Default branch name of the repository.", + "type": "string" + }, + "gitignores": { + "description": "List of gitignore template names user can choose from. Valid values: actionscript, ada, agda, android, anjuta, ansible, appcelerator-titanium, app-engine, archives, arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, mercurial, mercury, metals, meta-programming-system, meteor, microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, terraform, tex, text-mate, textpattern, think-php, tortoise-git, turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, yeoman, yii, zend-framework, zephir.", + "items": { + "type": "string" + }, + "type": "array" + }, + "license": { + "description": "License template name user can choose from. Valid values: license-0bsd, license-389-exception, aal, abstyles, adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, gcc-exception-3-1, gd, gfdl-1-1-invariants-only, gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, unicode-dfs-2015, unicode-dfs-2016, unicode-tou, universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1.", + "type": "string" + }, + "readme": { + "description": "README template name. Valid template name(s) are: default.", + "type": "string" + } + }, + "type": "object" + }, + "Instance": { + "description": "A resource that represents a Secure Source Manager instance.", + "id": "Instance", + "properties": { + "createTime": { + "description": "Output only. Create timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "hostConfig": { + "$ref": "HostConfig", + "description": "Output only. A list of hostnames for this instance.", + "readOnly": true + }, + "kmsKey": { + "description": "Optional. Immutable. Customer-managed encryption key name, in the format projects/*/locations/*/keyRings/*/cryptoKeys/*.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs.", + "type": "object" + }, + "name": { + "description": "Optional. A unique identifier for an instance. The name should be of the format: `projects/{project_number}/locations/{location_id}/instances/{instance_id}` `project_number`: Maps to a unique int64 id assigned to each project. `location_id`: Refers to the region where the instance will be deployed. Since Secure Source Manager is a regional service, it must be one of the valid GCP regions. `instance_id`: User provided name for the instance, must be unique for a project_number and location_id combination.", + "type": "string" + }, + "privateConfig": { + "$ref": "PrivateConfig", + "description": "Optional. Private settings for private instance." + }, + "state": { + "description": "Output only. Current state of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "PAUSED", + "UNKNOWN" + ], + "enumDescriptions": [ + "Not set. This should only be the case for incoming requests.", + "Instance is being created.", + "Instance is ready.", + "Instance is being deleted.", + "Instance is paused.", + "Instance is unknown, we are not sure if it's functioning." + ], + "readOnly": true, + "type": "string" + }, + "stateNote": { + "description": "Output only. An optional field providing information about the current instance state.", + "enum": [ + "STATE_NOTE_UNSPECIFIED", + "PAUSED_CMEK_UNAVAILABLE", + "INSTANCE_RESUMING" + ], + "enumDeprecated": [ + false, + false, + true + ], + "enumDescriptions": [ + "STATE_NOTE_UNSPECIFIED as the first value of State.", + "CMEK access is unavailable.", + "INSTANCE_RESUMING indicates that the instance was previously paused and is under the process of being brought back." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "workforceIdentityFederationConfig": { + "$ref": "WorkforceIdentityFederationConfig", + "description": "Optional. Configuration for Workforce Identity Federation to support third party identity provider. If unset, defaults to the Google OIDC IdP." + } + }, + "type": "object" + }, + "Issue": { + "description": "Metadata of an Issue.", + "id": "Issue", + "properties": { + "body": { + "description": "Optional. Issue body. Provides a detailed description of the issue.", + "type": "string" + }, + "closeTime": { + "description": "Output only. Close timestamp (if closed). Cleared when is re-opened.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "etag": { + "description": "Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "name": { + "description": "Identifier. Unique identifier for an issue. The issue id is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`", + "type": "string" + }, + "state": { + "description": "Output only. State of the issue.", + "enum": [ + "STATE_UNSPECIFIED", + "OPEN", + "CLOSED" + ], + "enumDescriptions": [ + "Unspecified.", + "An open issue.", + "A closed issue." + ], + "readOnly": true, + "type": "string" + }, + "title": { + "description": "Required. Issue title.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Last updated timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "IssueComment": { + "description": "IssueComment represents a comment on an issue.", + "id": "IssueComment", + "properties": { + "body": { + "description": "Required. The comment body.", + "type": "string" + }, + "createTime": { + "description": "Output only. Creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. Unique identifier for an issue comment. The comment id is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}`", + "type": "string" + }, + "updateTime": { + "description": "Output only. Last updated timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ListBranchRulesResponse": { + "description": "ListBranchRulesResponse is the response to listing branchRules.", + "id": "ListBranchRulesResponse", + "properties": { + "branchRules": { + "description": "The list of branch rules.", + "items": { + "$ref": "BranchRule" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListHooksResponse": { + "description": "ListHooksResponse is response to list hooks.", + "id": "ListHooksResponse", + "properties": { + "hooks": { + "description": "The list of hooks.", + "items": { + "$ref": "Hook" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListInstancesResponse": { + "id": "ListInstancesResponse", + "properties": { + "instances": { + "description": "The list of instances.", + "items": { + "$ref": "Instance" + }, + "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" + }, + "ListIssueCommentsResponse": { + "description": "The response to list issue comments.", + "id": "ListIssueCommentsResponse", + "properties": { + "issueComments": { + "description": "The list of issue comments.", + "items": { + "$ref": "IssueComment" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListIssuesResponse": { + "description": "The response to list issues.", + "id": "ListIssuesResponse", + "properties": { + "issues": { + "description": "The list of issues.", + "items": { + "$ref": "Issue" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "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" + }, + "ListPullRequestCommentsResponse": { + "description": "The response to list pull request comments.", + "id": "ListPullRequestCommentsResponse", + "properties": { + "nextPageToken": { + "description": "A token to set as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "pullRequestComments": { + "description": "The list of pull request comments.", + "items": { + "$ref": "PullRequestComment" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListPullRequestFileDiffsResponse": { + "description": "ListPullRequestFileDiffsResponse is the response containing file diffs returned from ListPullRequestFileDiffs.", + "id": "ListPullRequestFileDiffsResponse", + "properties": { + "fileDiffs": { + "description": "The list of pull request file diffs.", + "items": { + "$ref": "FileDiff" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListPullRequestsResponse": { + "description": "ListPullRequestsResponse is the response to list pull requests.", + "id": "ListPullRequestsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "pullRequests": { + "description": "The list of pull requests.", + "items": { + "$ref": "PullRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListRepositoriesResponse": { + "id": "ListRepositoriesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "repositories": { + "description": "The list of repositories.", + "items": { + "$ref": "Repository" + }, + "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" + }, + "MergePullRequestRequest": { + "description": "MergePullRequestRequest is the request to merge a pull request.", + "id": "MergePullRequestRequest", + "properties": {}, + "type": "object" + }, + "OpenIssueRequest": { + "description": "The request to open an issue.", + "id": "OpenIssueRequest", + "properties": { + "etag": { + "description": "Optional. The current etag of the issue. If the etag is provided and does not match the current etag of the issue, opening will be blocked and an ABORTED error will be returned.", + "type": "string" + } + }, + "type": "object" + }, + "OpenPullRequestRequest": { + "description": "OpenPullRequestRequest is the request to open a pull request.", + "id": "OpenPullRequestRequest", + "properties": {}, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Position": { + "description": "The position of the code comment.", + "id": "Position", + "properties": { + "line": { + "description": "Required. The line number of the comment. Positive value means it's on the new side of the diff, negative value means it's on the old side.", + "format": "int64", + "type": "string" + }, + "path": { + "description": "Required. The path of the file.", + "type": "string" + } + }, + "type": "object" + }, + "PrivateConfig": { + "description": "PrivateConfig includes settings for private instance.", + "id": "PrivateConfig", + "properties": { + "caPool": { + "description": "Optional. Immutable. CA pool resource, resource must in the format of `projects/{project}/locations/{location}/caPools/{ca_pool}`.", + "type": "string" + }, + "httpServiceAttachment": { + "description": "Output only. Service Attachment for HTTP, resource is in the format of `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`.", + "readOnly": true, + "type": "string" + }, + "isPrivate": { + "description": "Required. Immutable. Indicate if it's private instance.", + "type": "boolean" + }, + "pscAllowedProjects": { + "description": "Optional. Additional allowed projects for setting up PSC connections. Instance host project is automatically allowed and does not need to be included in this list.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sshServiceAttachment": { + "description": "Output only. Service Attachment for SSH, resource is in the format of `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PullRequest": { + "description": "Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base).", + "id": "PullRequest", + "properties": { + "base": { + "$ref": "Branch", + "description": "Required. The branch to merge changes in." + }, + "body": { + "description": "Optional. The pull request body. Provides a detailed description of the changes.", + "type": "string" + }, + "closeTime": { + "description": "Output only. Close timestamp (if closed or merged). Cleared when pull request is re-opened.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "head": { + "$ref": "Branch", + "description": "Immutable. The branch containing the changes to be merged." + }, + "name": { + "description": "Output only. A unique identifier for a PullRequest. The number appended at the end is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}`", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the pull request (open, closed or merged).", + "enum": [ + "STATE_UNSPECIFIED", + "OPEN", + "CLOSED", + "MERGED" + ], + "enumDescriptions": [ + "Unspecified.", + "An open pull request.", + "A closed pull request.", + "A merged pull request." + ], + "readOnly": true, + "type": "string" + }, + "title": { + "description": "Required. The pull request title.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Last updated timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PullRequestComment": { + "description": "PullRequestComment represents a comment on a pull request.", + "id": "PullRequestComment", + "properties": { + "code": { + "$ref": "Code", + "description": "Optional. The comment on a code line." + }, + "comment": { + "$ref": "Comment", + "description": "Optional. The general pull request comment." + }, + "createTime": { + "description": "Output only. Creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. Unique identifier for the pull request comment. The comment id is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}`", + "type": "string" + }, + "review": { + "$ref": "Review", + "description": "Optional. The review summary comment." + }, + "updateTime": { + "description": "Output only. Last updated timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PushOption": { + "id": "PushOption", + "properties": { + "branchFilter": { + "description": "Optional. Trigger hook for matching branches only. Specified as glob pattern. If empty or *, events for all branches are reported. Examples: main, {main,release*}. See https://pkg.go.dev/github.com/gobwas/glob documentation.", + "type": "string" + } + }, + "type": "object" + }, + "Repository": { + "description": "Metadata of a Secure Source Manager repository.", + "id": "Repository", + "properties": { + "createTime": { + "description": "Output only. Create timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the repository, which cannot exceed 500 characters.", + "type": "string" + }, + "etag": { + "description": "Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "initialConfig": { + "$ref": "InitialConfig", + "description": "Input only. Initial configurations for the repository." + }, + "instance": { + "description": "Optional. The name of the instance in which the repository is hosted, formatted as `projects/{project_number}/locations/{location_id}/instances/{instance_id}` When creating repository via securesourcemanager.googleapis.com, this field is used as input. When creating repository via *.sourcemanager.dev, this field is output only.", + "type": "string" + }, + "name": { + "description": "Optional. A unique identifier for a repository. The name should be of the format: `projects/{project}/locations/{location_id}/repositories/{repository_id}`", + "type": "string" + }, + "uid": { + "description": "Output only. Unique identifier of the repository.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "uris": { + "$ref": "URIs", + "description": "Output only. URIs for the repository.", + "readOnly": true + } + }, + "type": "object" + }, + "ResolvePullRequestCommentsRequest": { + "description": "The request to resolve multiple pull request comments.", + "id": "ResolvePullRequestCommentsRequest", + "properties": { + "autoFill": { + "description": "Optional. If set, at least one comment in a thread is required, rest of the comments in the same thread will be automatically updated to resolved. If unset, all comments in the same thread need be present.", + "type": "boolean" + }, + "names": { + "description": "Required. The names of the pull request comments to resolve. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` Only comments from the same threads are allowed in the same request.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Review": { + "description": "The review summary comment.", + "id": "Review", + "properties": { + "actionType": { + "description": "Required. The review action type.", + "enum": [ + "ACTION_TYPE_UNSPECIFIED", + "COMMENT", + "CHANGE_REQUESTED", + "APPROVED" + ], + "enumDescriptions": [ + "Unspecified.", + "A general review comment.", + "Change required from this review.", + "Change approved from this review." + ], + "type": "string" + }, + "body": { + "description": "Optional. The comment body.", + "type": "string" + }, + "effectiveCommitSha": { + "description": "Output only. The effective commit sha this review is pointing to.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TreeEntry": { + "description": "Represents an entry within a tree structure (like a Git tree).", + "id": "TreeEntry", + "properties": { + "mode": { + "description": "Output only. The file mode as a string (e.g., \"100644\"). Indicates file type. Output-only.", + "readOnly": true, + "type": "string" + }, + "path": { + "description": "Output only. The path of the file or directory within the tree (e.g., \"src/main/java/MyClass.java\"). Output-only.", + "readOnly": true, + "type": "string" + }, + "sha": { + "description": "Output only. The SHA-1 hash of the object (unique identifier). Output-only.", + "readOnly": true, + "type": "string" + }, + "size": { + "description": "Output only. The size of the object in bytes (only for blobs). Output-only.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. The type of the object (TREE, BLOB, COMMIT). Output-only.", + "enum": [ + "OBJECT_TYPE_UNSPECIFIED", + "TREE", + "BLOB", + "COMMIT" + ], + "enumDescriptions": [ + "Default value, indicating the object type is unspecified.", + "Represents a directory (folder).", + "Represents a file (contains file data).", + "Represents a pointer to another repository (submodule)." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "URIs": { + "description": "URIs for the repository.", + "id": "URIs", + "properties": { + "api": { + "description": "Output only. API is the URI for API access.", + "readOnly": true, + "type": "string" + }, + "gitHttps": { + "description": "Output only. git_https is the git HTTPS URI for git operations.", + "readOnly": true, + "type": "string" + }, + "html": { + "description": "Output only. HTML is the URI for user to view the repository in a browser.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "UnresolvePullRequestCommentsRequest": { + "description": "The request to unresolve multiple pull request comments.", + "id": "UnresolvePullRequestCommentsRequest", + "properties": { + "autoFill": { + "description": "Optional. If set, at least one comment in a thread is required, rest of the comments in the same thread will be automatically updated to unresolved. If unset, all comments in the same thread need be present.", + "type": "boolean" + }, + "names": { + "description": "Required. The names of the pull request comments to unresolve. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` Only comments from the same threads are allowed in the same request.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "WorkforceIdentityFederationConfig": { + "description": "WorkforceIdentityFederationConfig allows this instance to support users from external identity providers.", + "id": "WorkforceIdentityFederationConfig", + "properties": { + "enabled": { + "description": "Optional. Immutable. Whether Workforce Identity Federation is enabled.", + "type": "boolean" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Secure Source Manager API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/securesourcemanager/v1/securesourcemanager-gen.go b/securesourcemanager/v1/securesourcemanager-gen.go new file mode 100644 index 0000000000..d1ddd36582 --- /dev/null +++ b/securesourcemanager/v1/securesourcemanager-gen.go @@ -0,0 +1,9587 @@ +// Copyright 2025 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 securesourcemanager provides access to the Secure Source Manager API. +// +// For product documentation, see: https://cloud.google.com/secure-source-manager +// +// # 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/securesourcemanager/v1" +// ... +// ctx := context.Background() +// securesourcemanagerService, err := securesourcemanager.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]: +// +// securesourcemanagerService, err := securesourcemanager.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, ...) +// securesourcemanagerService, err := securesourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package securesourcemanager // import "google.golang.org/api/securesourcemanager/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "log/slog" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/googleapis/gax-go/v2/internallog" + 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 +var _ = internallog.New + +const apiId = "securesourcemanager:v1" +const apiName = "securesourcemanager" +const apiVersion = "v1" +const basePath = "https://securesourcemanager.googleapis.com/" +const basePathTemplate = "https://securesourcemanager.universe_domain/" +const mtlsBasePath = "https://securesourcemanager.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 := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} + s.Projects = NewProjectsService(s) + 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") + } + return NewService(context.TODO(), option.WithHTTPClient(client)) +} + +type Service struct { + client *http.Client + logger *slog.Logger + 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.Instances = NewProjectsLocationsInstancesService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Repositories = NewProjectsLocationsRepositoriesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Instances *ProjectsLocationsInstancesService + + Operations *ProjectsLocationsOperationsService + + Repositories *ProjectsLocationsRepositoriesService +} + +func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService { + rs := &ProjectsLocationsInstancesService{s: s} + return rs +} + +type ProjectsLocationsInstancesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsRepositoriesService(s *Service) *ProjectsLocationsRepositoriesService { + rs := &ProjectsLocationsRepositoriesService{s: s} + rs.BranchRules = NewProjectsLocationsRepositoriesBranchRulesService(s) + rs.Hooks = NewProjectsLocationsRepositoriesHooksService(s) + rs.Issues = NewProjectsLocationsRepositoriesIssuesService(s) + rs.PullRequests = NewProjectsLocationsRepositoriesPullRequestsService(s) + return rs +} + +type ProjectsLocationsRepositoriesService struct { + s *Service + + BranchRules *ProjectsLocationsRepositoriesBranchRulesService + + Hooks *ProjectsLocationsRepositoriesHooksService + + Issues *ProjectsLocationsRepositoriesIssuesService + + PullRequests *ProjectsLocationsRepositoriesPullRequestsService +} + +func NewProjectsLocationsRepositoriesBranchRulesService(s *Service) *ProjectsLocationsRepositoriesBranchRulesService { + rs := &ProjectsLocationsRepositoriesBranchRulesService{s: s} + return rs +} + +type ProjectsLocationsRepositoriesBranchRulesService struct { + s *Service +} + +func NewProjectsLocationsRepositoriesHooksService(s *Service) *ProjectsLocationsRepositoriesHooksService { + rs := &ProjectsLocationsRepositoriesHooksService{s: s} + return rs +} + +type ProjectsLocationsRepositoriesHooksService struct { + s *Service +} + +func NewProjectsLocationsRepositoriesIssuesService(s *Service) *ProjectsLocationsRepositoriesIssuesService { + rs := &ProjectsLocationsRepositoriesIssuesService{s: s} + rs.IssueComments = NewProjectsLocationsRepositoriesIssuesIssueCommentsService(s) + return rs +} + +type ProjectsLocationsRepositoriesIssuesService struct { + s *Service + + IssueComments *ProjectsLocationsRepositoriesIssuesIssueCommentsService +} + +func NewProjectsLocationsRepositoriesIssuesIssueCommentsService(s *Service) *ProjectsLocationsRepositoriesIssuesIssueCommentsService { + rs := &ProjectsLocationsRepositoriesIssuesIssueCommentsService{s: s} + return rs +} + +type ProjectsLocationsRepositoriesIssuesIssueCommentsService struct { + s *Service +} + +func NewProjectsLocationsRepositoriesPullRequestsService(s *Service) *ProjectsLocationsRepositoriesPullRequestsService { + rs := &ProjectsLocationsRepositoriesPullRequestsService{s: s} + rs.PullRequestComments = NewProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService(s) + return rs +} + +type ProjectsLocationsRepositoriesPullRequestsService struct { + s *Service + + PullRequestComments *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService +} + +func NewProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService(s *Service) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService { + rs := &ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService{s: s} + return rs +} + +type ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService struct { + s *Service +} + +// AuditConfig: Specifies the audit configuration for a service. The +// configuration determines which permission types are logged, and what +// identities, if any, are exempted from logging. An AuditConfig must have one +// or more AuditLogConfigs. If there are AuditConfigs for both `allServices` +// and a specific service, the union of the two AuditConfigs is used for that +// service: the log_types specified in each AuditConfig are enabled, and the +// exempted_members in each AuditLogConfig are exempted. Example Policy with +// multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ +// "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": +// "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", +// "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": +// "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For +// sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ +// logging. It also exempts `jose@example.com` from DATA_READ logging, and +// `aliya@example.com` from DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + // Service: Specifies a service that will be enabled for audit logging. For + // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` + // is a special value that covers all services. + Service string `json:"service,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") 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. "AuditLogConfigs") 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 AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", +// "exempted_members": [ "user:jose@example.com" ] }, { "log_type": +// "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while +// exempting jose@example.com from DATA_READ logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging for this + // type of permission. Follows the same format of Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") 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. "ExemptedMembers") 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 AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BatchCreatePullRequestCommentsRequest: The request to batch create pull +// request comments. +type BatchCreatePullRequestCommentsRequest struct { + // Requests: Required. The request message specifying the resources to create. + // There should be exactly one CreatePullRequestCommentRequest with + // CommentDetail being REVIEW in the list, and no more than 100 + // CreatePullRequestCommentRequests with CommentDetail being CODE in the list + Requests []*CreatePullRequestCommentRequest `json:"requests,omitempty"` + // ForceSendFields is a list of field names (e.g. "Requests") 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. "Requests") 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 BatchCreatePullRequestCommentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreatePullRequestCommentsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the current + // request. If the condition evaluates to `false`, then this binding does not + // apply to the current request. However, a different role binding might grant + // the same role to one or more of the principals in this binding. To learn + // which resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + // Members: Specifies the principals requesting access for a Google Cloud + // resource. `members` can have the following values: * `allUsers`: A special + // identifier that represents anyone who is on the internet; with or without a + // Google account. * `allAuthenticatedUsers`: A special identifier that + // represents anyone who is authenticated with a Google account or a service + // account. Does not include identities that come from external identity + // providers (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that + // represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An + // identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * + // `group:{emailid}`: An email address that represents a Google group. For + // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain + // (primary) that represents all the users of that domain. For example, + // `google.com` or `example.com`. * + // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub + // ject/{subject_attribute_value}`: A single identity in a workforce identity + // pool. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // group/{group_id}`: All workforce identities in a group. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // attribute.{attribute_name}/{attribute_value}`: All workforce identities with + // a specific attribute value. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // *`: All identities in a workforce identity pool. * + // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo + // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single + // identity in a workload identity pool. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool + // group. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} + // `: All identities in a workload identity pool with a certain attribute. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity + // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently deleted. For + // example, `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered user + // retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a service account that has been recently + // deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the + // service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains the + // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email + // address (plus unique identifier) representing a Google group that has been + // recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is recovered, + // this value reverts to `group:{emailid}` and the recovered group retains the + // role in the binding. * + // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool + // _id}/subject/{subject_attribute_value}`: Deleted single identity in a + // workforce identity pool. For example, + // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po + // ol-id/subject/my-subject-attribute-value`. + Members []string `json:"members,omitempty"` + // Role: Role that is assigned to the list of `members`, or principals. For + // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview + // of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). + Role string `json:"role,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // 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. "Condition") 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 Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Branch: Branch represents a branch involved in a pull request. +type Branch struct { + // Ref: Required. Name of the branch. + Ref string `json:"ref,omitempty"` + // Sha: Output only. The commit at the tip of the branch. + Sha string `json:"sha,omitempty"` + // ForceSendFields is a list of field names (e.g. "Ref") 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. "Ref") 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 Branch) MarshalJSON() ([]byte, error) { + type NoMethod Branch + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BranchRule: Metadata of a BranchRule. BranchRule is the protection rule to +// enforce pre-defined rules on designated branches within a repository. +type BranchRule struct { + // AllowStaleReviews: Optional. Determines if allow stale reviews or approvals + // before merging to the branch. + AllowStaleReviews bool `json:"allowStaleReviews,omitempty"` + // Annotations: Optional. User annotations. These attributes can only be set + // and used by the user. See https://google.aip.dev/128#annotations for more + // details such as format and size limitations. + Annotations map[string]string `json:"annotations,omitempty"` + // CreateTime: Output only. Create timestamp. + CreateTime string `json:"createTime,omitempty"` + // Disabled: Optional. Determines if the branch rule is disabled or not. + Disabled bool `json:"disabled,omitempty"` + // Etag: Optional. This checksum is computed by the server based on the value + // of other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + // IncludePattern: Optional. The pattern of the branch that can match to this + // BranchRule. Specified as regex. .* for all branches. Examples: main, + // (main|release.*). Current MVP phase only support `.*` for wildcard. + IncludePattern string `json:"includePattern,omitempty"` + // MinimumApprovalsCount: Optional. The minimum number of approvals required + // for the branch rule to be matched. + MinimumApprovalsCount int64 `json:"minimumApprovalsCount,omitempty"` + // MinimumReviewsCount: Optional. The minimum number of reviews required for + // the branch rule to be matched. + MinimumReviewsCount int64 `json:"minimumReviewsCount,omitempty"` + // Name: Optional. A unique identifier for a BranchRule. The name should be of + // the format: + // `projects/{project}/locations/{location}/repositories/{repository}/branchRule + // s/{branch_rule}` + Name string `json:"name,omitempty"` + // RequireCommentsResolved: Optional. Determines if require comments resolved + // before merging to the branch. + RequireCommentsResolved bool `json:"requireCommentsResolved,omitempty"` + // RequireLinearHistory: Optional. Determines if require linear history before + // merging to the branch. + RequireLinearHistory bool `json:"requireLinearHistory,omitempty"` + // RequirePullRequest: Optional. Determines if the branch rule requires a pull + // request or not. + RequirePullRequest bool `json:"requirePullRequest,omitempty"` + // RequiredStatusChecks: Optional. List of required status checks before + // merging to the branch. + RequiredStatusChecks []*Check `json:"requiredStatusChecks,omitempty"` + // Uid: Output only. Unique identifier of the repository. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. Update timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AllowStaleReviews") 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. "AllowStaleReviews") 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 BranchRule) MarshalJSON() ([]byte, error) { + type NoMethod BranchRule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// Check: Check is a type for status check. +type Check struct { + // Context: Required. The context of the check. + Context string `json:"context,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 Check) MarshalJSON() ([]byte, error) { + type NoMethod Check + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloseIssueRequest: The request to close an issue. +type CloseIssueRequest struct { + // Etag: Optional. The current etag of the issue. If the etag is provided and + // does not match the current etag of the issue, closing will be blocked and an + // ABORTED error will be returned. + Etag string `json:"etag,omitempty"` + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 CloseIssueRequest) MarshalJSON() ([]byte, error) { + type NoMethod CloseIssueRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ClosePullRequestRequest: ClosePullRequestRequest is the request to close a +// pull request. +type ClosePullRequestRequest struct { +} + +// Code: The comment on a code line. +type Code struct { + // Body: Required. The comment body. + Body string `json:"body,omitempty"` + // EffectiveCommitSha: Output only. The effective commit sha this code comment + // is pointing to. + EffectiveCommitSha string `json:"effectiveCommitSha,omitempty"` + // EffectiveRootComment: Output only. The root comment of the conversation, + // derived from the reply field. + EffectiveRootComment string `json:"effectiveRootComment,omitempty"` + // Position: Optional. The position of the comment. + Position *Position `json:"position,omitempty"` + // Reply: Optional. Input only. The PullRequestComment resource name that this + // comment is replying to. + Reply string `json:"reply,omitempty"` + // Resolved: Output only. Boolean indicator if the comment is resolved. + Resolved bool `json:"resolved,omitempty"` + // ForceSendFields is a list of field names (e.g. "Body") 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. "Body") 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 Code) MarshalJSON() ([]byte, error) { + type NoMethod Code + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Comment: The general pull request comment. +type Comment struct { + // Body: Required. The comment body. + Body string `json:"body,omitempty"` + // ForceSendFields is a list of field names (e.g. "Body") 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. "Body") 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 Comment) MarshalJSON() ([]byte, error) { + type NoMethod Comment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CreatePullRequestCommentRequest: The request to create a pull request +// comment. +type CreatePullRequestCommentRequest struct { + // Parent: Required. The pull request in which to create the pull request + // comment. Format: + // `projects/{project_number}/locations/{location_id}/repositories/{repository_i + // d}/pullRequests/{pull_request_id}` + Parent string `json:"parent,omitempty"` + // PullRequestComment: Required. The pull request comment to create. + PullRequestComment *PullRequestComment `json:"pullRequestComment,omitempty"` + // ForceSendFields is a list of field names (e.g. "Parent") 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. "Parent") 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 CreatePullRequestCommentRequest) MarshalJSON() ([]byte, error) { + type NoMethod CreatePullRequestCommentRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use it as +// the request or the response type of an API method. For instance: service Foo +// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// Expr: Represents a textual expression in the Common Expression Language +// (CEL) syntax. CEL is a C-like expression language. The syntax and semantics +// of CEL are documented at https://github.com/google/cel-spec. Example +// (Comparison): title: "Summary size limit" description: "Determines if a +// summary is less than 100 chars" expression: "document.summary.size() < 100" +// Example (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly visible" +// expression: "document.type != 'private' && document.type != 'internal'" +// Example (Data Manipulation): title: "Notification string" description: +// "Create a notification string with a timestamp." expression: "'New message +// received at ' + string(document.create_time)" The exact variables and +// functions that may be referenced within an expression are determined by the +// service that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a longer text + // which describes the expression, e.g. when hovered over it in a UI. + Description string `json:"description,omitempty"` + // Expression: Textual representation of an expression in Common Expression + // Language syntax. + Expression string `json:"expression,omitempty"` + // Location: Optional. String indicating the location of the expression for + // error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + // Title: Optional. Title for the expression, i.e. a short string describing + // its purpose. This can be used e.g. in UIs which allow to enter the + // expression. + Title string `json:"title,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 Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// FetchBlobResponse: Response message containing the content of a blob. +type FetchBlobResponse struct { + // Content: The content of the blob, encoded as base64. + Content string `json:"content,omitempty"` + // Sha: The SHA-1 hash of the blob. + Sha string `json:"sha,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 FetchBlobResponse) MarshalJSON() ([]byte, error) { + type NoMethod FetchBlobResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// FetchTreeResponse: Response message containing a list of TreeEntry objects. +type FetchTreeResponse struct { + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // TreeEntries: The list of TreeEntry objects. + TreeEntries []*TreeEntry `json:"treeEntries,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 FetchTreeResponse) MarshalJSON() ([]byte, error) { + type NoMethod FetchTreeResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// FileDiff: Metadata of a FileDiff. FileDiff represents a single file diff in +// a pull request. +type FileDiff struct { + // Action: Output only. The action taken on the file (eg. added, modified, + // deleted). + // + // Possible values: + // "ACTION_UNSPECIFIED" - Unspecified. + // "ADDED" - The file was added. + // "MODIFIED" - The file was modified. + // "DELETED" - The file was deleted. + Action string `json:"action,omitempty"` + // Name: Output only. The name of the file. + Name string `json:"name,omitempty"` + // Patch: Output only. The git patch containing the file changes. + Patch string `json:"patch,omitempty"` + // Sha: Output only. The commit pointing to the file changes. + Sha string `json:"sha,omitempty"` + // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") 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 FileDiff) MarshalJSON() ([]byte, error) { + type NoMethod FileDiff + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Hook: Metadata of a Secure Source Manager Hook. +type Hook struct { + // CreateTime: Output only. Create timestamp. + CreateTime string `json:"createTime,omitempty"` + // Disabled: Optional. Determines if the hook disabled or not. Set to true to + // stop sending traffic. + Disabled bool `json:"disabled,omitempty"` + // Events: Optional. The events that trigger hook on. + // + // Possible values: + // "UNSPECIFIED" - Unspecified. + // "PUSH" - Push events are triggered when pushing to the repository. + // "PULL_REQUEST" - Pull request events are triggered when a pull request is + // opened, closed, reopened, or edited. + Events []string `json:"events,omitempty"` + // Name: Identifier. A unique identifier for a Hook. The name should be of the + // format: + // `projects/{project}/locations/{location_id}/repositories/{repository_id}/hook + // s/{hook_id}` + Name string `json:"name,omitempty"` + // PushOption: Optional. The trigger option for push events. + PushOption *PushOption `json:"pushOption,omitempty"` + // SensitiveQueryString: Optional. The sensitive query string to be appended to + // the target URI. + SensitiveQueryString string `json:"sensitiveQueryString,omitempty"` + // TargetUri: Required. The target URI to which the payloads will be delivered. + TargetUri string `json:"targetUri,omitempty"` + // Uid: Output only. Unique identifier of the hook. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. Update timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. 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 Hook) MarshalJSON() ([]byte, error) { + type NoMethod Hook + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// HostConfig: HostConfig has different instance endpoints. +type HostConfig struct { + // Api: Output only. API hostname. + Api string `json:"api,omitempty"` + // GitHttp: Output only. Git HTTP hostname. + GitHttp string `json:"gitHttp,omitempty"` + // GitSsh: Output only. Git SSH hostname. + GitSsh string `json:"gitSsh,omitempty"` + // Html: Output only. HTML hostname. + Html string `json:"html,omitempty"` + // ForceSendFields is a list of field names (e.g. "Api") 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. "Api") 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 HostConfig) MarshalJSON() ([]byte, error) { + type NoMethod HostConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// InitialConfig: Repository initialization configuration. +type InitialConfig struct { + // DefaultBranch: Default branch name of the repository. + DefaultBranch string `json:"defaultBranch,omitempty"` + // Gitignores: List of gitignore template names user can choose from. Valid + // values: actionscript, ada, agda, android, anjuta, ansible, + // appcelerator-titanium, app-engine, archives, arch-linux-packages, + // atmel-studio, autotools, backup, bazaar, bazel, bitrix, bricx-cc, c, + // cake-php, calabash, cf-wheels, chef-cookbook, clojure, cloud9, c-make, + // code-igniter, code-kit, code-sniffer, common-lisp, composer, concrete5, coq, + // cordova, cpp, craft-cms, cuda, cvs, d, dart, dart-editor, delphi, diff, dm, + // dreamweaver, dropbox, drupal, drupal-7, eagle, eclipse, eiffel-studio, + // elisp, elixir, elm, emacs, ensime, epi-server, erlang, esp-idf, espresso, + // exercism, expression-engine, ext-js, fancy, finale, flex-builder, + // force-dot-com, fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, + // godot, gpg, gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, + // images, infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, + // jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, + // kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, + // lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, + // logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, + // mercurial, mercury, metals, meta-programming-system, meteor, + // microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, + // nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, + // opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, + // phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, + // psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, + // rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, + // sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, + // slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, sugar-crm, + // svn, swift, symfony, symphony-cms, synopsys-vcs, tags, terraform, tex, + // text-mate, textpattern, think-php, tortoise-git, turbo-gears-2, typo3, + // umbraco, unity, unreal-engine, vagrant, vim, virtual-env, virtuoso, + // visual-studio, visual-studio-code, vue, vvvv, waf, web-methods, windows, + // word-press, xcode, xilinx, xilinx-ise, xojo, yeoman, yii, zend-framework, + // zephir. + Gitignores []string `json:"gitignores,omitempty"` + // License: License template name user can choose from. Valid values: + // license-0bsd, license-389-exception, aal, abstyles, adobe-2006, adobe-glyph, + // adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, afl-3-0, afmparse, agpl-1-0, + // agpl-1-0-only, agpl-1-0-or-later, agpl-3-0-only, agpl-3-0-or-later, aladdin, + // amdplpa, aml, ampas, antlr-pd, antlr-pd-fallback, apache-1-0, apache-1-1, + // apache-2-0, apafml, apl-1-0, apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, + // artistic-1-0, artistic-1-0-cl8, artistic-1-0-perl, artistic-2-0, + // autoconf-exception-2-0, autoconf-exception-3-0, bahyph, barr, beerware, + // bison-exception-2-2, bittorrent-1-0, bittorrent-1-1, blessing, + // blueoak-1-0-0, bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, + // bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, + // bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, + // bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, + // bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, + // bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, + // bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, + // bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, + // catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, + // cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, + // cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, + // cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, + // cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, cc-by-nd-3-0, + // cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, cc-by-sa-2-1-jp, + // cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, cddl-1-0, cddl-1-1, + // cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, cecill-1-1, cecill-2-0, + // cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, cern-ohl-1-2, cern-ohl-p-2-0, + // cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, classpath-exception-2-0, + // clisp-exception-2-0, cnri-jython, cnri-python, cnri-python-gpl-compatible, + // condor-1-1, copyleft-next-0-3-0, copyleft-next-0-3-1, cpal-1-0, cpl-1-0, + // cpol-1-02, crossword, crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, + // d-fsl-1-0, diffmark, digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, + // dvipdfm, ecl-1-0, ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, + // entessa, epics, epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, + // eupl-1-0, eupl-1-1, eupl-1-2, eurosym, fair, fawkes-runtime-exception, + // fltk-exception, font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, + // freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, + // gcc-exception-3-1, gd, gfdl-1-1-invariants-only, + // gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, + // gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, + // gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, + // gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, gfdl-1-2-only, + // gfdl-1-2-or-later, gfdl-1-3-invariants-only, gfdl-1-3-invariants-or-later, + // gfdl-1-3-no-invariants-only, gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, + // gfdl-1-3-or-later, giftware, gl2ps, glide, glulxe, glwtpl, + // gnu-javamail-exception, gnuplot, gpl-1-0-only, gpl-1-0-or-later, + // gpl-2-0-only, gpl-2-0-or-later, gpl-3-0-linking-exception, + // gpl-3-0-linking-source-exception, gpl-3-0-only, gpl-3-0-or-later, + // gpl-cc-1-0, gsoap-1-3b, haskell-report, hippocratic-2-1, hpnd, + // hpnd-sell-variant, htmltidy, i2p-gpl-java-exception, ibm-pibs, icu, ijg, + // image-magick, imatix, imlib2, info-zip, intel, intel-acpi, interbase-1-0, + // ipa, ipl-1-0, isc, jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, + // leptonica, lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, + // lgpl-2-1-or-later, lgpl-3-0-linking-exception, lgpl-3-0-only, + // lgpl-3-0-or-later, lgpllr, libpng, libpng-2-0, libselinux-1-0, libtiff, + // libtool-exception, liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, + // linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, lppl-1-1, + // lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, mif-exception, + // miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, mit-feh, + // mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, mpl-1-0, + // mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, mtll, + // mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, naumen, + // nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, nist-pd, + // nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, nosl, + // noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, + // ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, + // odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, + // ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, + // ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, oldap-1-3, + // oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, oldap-2-2-1, + // oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, + // openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, opl-1-0, + // oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, o-uda-1-0, + // parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, plexus, + // polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, postgresql, + // psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, python-2-0, + // qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, + // qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, + // ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, sgi-b-1-1, + // sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, sissl-1-2, + // sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, spencer-99, spl-1-0, + // ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, swift-exception, swl, + // tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, tosl, tu-berlin-1-0, + // tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, unicode-dfs-2015, + // unicode-dfs-2016, unicode-tou, universal-foss-exception-1-0, unlicense, + // upl-1-0, vim, vostrom, vsl-1-0, w3c, w3c-19980720, w3c-20150513, watcom-1-0, + // wsuipa, wtfpl, wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, + // xnet, xpp, xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, + // zlib, zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. + License string `json:"license,omitempty"` + // Readme: README template name. Valid template name(s) are: default. + Readme string `json:"readme,omitempty"` + // ForceSendFields is a list of field names (e.g. "DefaultBranch") 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. "DefaultBranch") 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 InitialConfig) MarshalJSON() ([]byte, error) { + type NoMethod InitialConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Instance: A resource that represents a Secure Source Manager instance. +type Instance struct { + // CreateTime: Output only. Create timestamp. + CreateTime string `json:"createTime,omitempty"` + // HostConfig: Output only. A list of hostnames for this instance. + HostConfig *HostConfig `json:"hostConfig,omitempty"` + // KmsKey: Optional. Immutable. Customer-managed encryption key name, in the + // format projects/*/locations/*/keyRings/*/cryptoKeys/*. + KmsKey string `json:"kmsKey,omitempty"` + // Labels: Optional. Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + // Name: Optional. A unique identifier for an instance. The name should be of + // the format: + // `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + // `project_number`: Maps to a unique int64 id assigned to each project. + // `location_id`: Refers to the region where the instance will be deployed. + // Since Secure Source Manager is a regional service, it must be one of the + // valid GCP regions. `instance_id`: User provided name for the instance, must + // be unique for a project_number and location_id combination. + Name string `json:"name,omitempty"` + // PrivateConfig: Optional. Private settings for private instance. + PrivateConfig *PrivateConfig `json:"privateConfig,omitempty"` + // State: Output only. Current state of the instance. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. This should only be the case for incoming + // requests. + // "CREATING" - Instance is being created. + // "ACTIVE" - Instance is ready. + // "DELETING" - Instance is being deleted. + // "PAUSED" - Instance is paused. + // "UNKNOWN" - Instance is unknown, we are not sure if it's functioning. + State string `json:"state,omitempty"` + // StateNote: Output only. An optional field providing information about the + // current instance state. + // + // Possible values: + // "STATE_NOTE_UNSPECIFIED" - STATE_NOTE_UNSPECIFIED as the first value of + // State. + // "PAUSED_CMEK_UNAVAILABLE" - CMEK access is unavailable. + // "INSTANCE_RESUMING" - INSTANCE_RESUMING indicates that the instance was + // previously paused and is under the process of being brought back. + StateNote string `json:"stateNote,omitempty"` + // UpdateTime: Output only. Update timestamp. + UpdateTime string `json:"updateTime,omitempty"` + // WorkforceIdentityFederationConfig: Optional. Configuration for Workforce + // Identity Federation to support third party identity provider. If unset, + // defaults to the Google OIDC IdP. + WorkforceIdentityFederationConfig *WorkforceIdentityFederationConfig `json:"workforceIdentityFederationConfig,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 Instance) MarshalJSON() ([]byte, error) { + type NoMethod Instance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Issue: Metadata of an Issue. +type Issue struct { + // Body: Optional. Issue body. Provides a detailed description of the issue. + Body string `json:"body,omitempty"` + // CloseTime: Output only. Close timestamp (if closed). Cleared when is + // re-opened. + CloseTime string `json:"closeTime,omitempty"` + // CreateTime: Output only. Creation timestamp. + CreateTime string `json:"createTime,omitempty"` + // Etag: Optional. This checksum is computed by the server based on the value + // of other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + // Name: Identifier. Unique identifier for an issue. The issue id is generated + // by the server. Format: + // `projects/{project}/locations/{location}/repositories/{repository}/issues/{is + // sue_id}` + Name string `json:"name,omitempty"` + // State: Output only. State of the issue. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified. + // "OPEN" - An open issue. + // "CLOSED" - A closed issue. + State string `json:"state,omitempty"` + // Title: Required. Issue title. + Title string `json:"title,omitempty"` + // UpdateTime: Output only. Last updated timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Body") 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. "Body") 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 Issue) MarshalJSON() ([]byte, error) { + type NoMethod Issue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// IssueComment: IssueComment represents a comment on an issue. +type IssueComment struct { + // Body: Required. The comment body. + Body string `json:"body,omitempty"` + // CreateTime: Output only. Creation timestamp. + CreateTime string `json:"createTime,omitempty"` + // Name: Identifier. Unique identifier for an issue comment. The comment id is + // generated by the server. Format: + // `projects/{project}/locations/{location}/repositories/{repository}/issues/{is + // sue}/issueComments/{comment_id}` + Name string `json:"name,omitempty"` + // UpdateTime: Output only. Last updated timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Body") 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. "Body") 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 IssueComment) MarshalJSON() ([]byte, error) { + type NoMethod IssueComment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListBranchRulesResponse: ListBranchRulesResponse is the response to listing +// branchRules. +type ListBranchRulesResponse struct { + // BranchRules: The list of branch rules. + BranchRules []*BranchRule `json:"branchRules,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "BranchRules") 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. "BranchRules") 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 ListBranchRulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBranchRulesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListHooksResponse: ListHooksResponse is response to list hooks. +type ListHooksResponse struct { + // Hooks: The list of hooks. + Hooks []*Hook `json:"hooks,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "Hooks") 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. "Hooks") 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 ListHooksResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListHooksResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ListInstancesResponse struct { + // Instances: The list of instances. + Instances []*Instance `json:"instances,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. "Instances") 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. "Instances") 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 ListInstancesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInstancesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListIssueCommentsResponse: The response to list issue comments. +type ListIssueCommentsResponse struct { + // IssueComments: The list of issue comments. + IssueComments []*IssueComment `json:"issueComments,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "IssueComments") 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. "IssueComments") 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 ListIssueCommentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListIssueCommentsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListIssuesResponse: The response to list issues. +type ListIssuesResponse struct { + // Issues: The list of issues. + Issues []*Issue `json:"issues,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "Issues") 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. "Issues") 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 ListIssuesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListIssuesResponse + 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) +} + +// ListPullRequestCommentsResponse: The response to list pull request comments. +type ListPullRequestCommentsResponse struct { + // NextPageToken: A token to set as page_token to retrieve the next page. If + // this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // PullRequestComments: The list of pull request comments. + PullRequestComments []*PullRequestComment `json:"pullRequestComments,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 ListPullRequestCommentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPullRequestCommentsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListPullRequestFileDiffsResponse: ListPullRequestFileDiffsResponse is the +// response containing file diffs returned from ListPullRequestFileDiffs. +type ListPullRequestFileDiffsResponse struct { + // FileDiffs: The list of pull request file diffs. + FileDiffs []*FileDiff `json:"fileDiffs,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "FileDiffs") 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. "FileDiffs") 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 ListPullRequestFileDiffsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPullRequestFileDiffsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListPullRequestsResponse: ListPullRequestsResponse is the response to list +// pull requests. +type ListPullRequestsResponse struct { + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // PullRequests: The list of pull requests. + PullRequests []*PullRequest `json:"pullRequests,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 ListPullRequestsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPullRequestsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ListRepositoriesResponse struct { + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // Repositories: The list of repositories. + Repositories []*Repository `json:"repositories,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 ListRepositoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRepositoriesResponse + 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) +} + +// MergePullRequestRequest: MergePullRequestRequest is the request to merge a +// pull request. +type MergePullRequestRequest struct { +} + +// OpenIssueRequest: The request to open an issue. +type OpenIssueRequest struct { + // Etag: Optional. The current etag of the issue. If the etag is provided and + // does not match the current etag of the issue, opening will be blocked and an + // ABORTED error will be returned. + Etag string `json:"etag,omitempty"` + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 OpenIssueRequest) MarshalJSON() ([]byte, error) { + type NoMethod OpenIssueRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// OpenPullRequestRequest: OpenPullRequestRequest is the request to open a pull +// request. +type OpenPullRequestRequest struct { +} + +// 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 successfully + // been cancelled have Operation.error value with a google.rpc.Status.code of + // 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. 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) +} + +// Policy: An Identity and Access Management (IAM) policy, which specifies +// access controls for Google Cloud resources. A `Policy` is a collection of +// `bindings`. A `binding` binds one or more `members`, or principals, to a +// single `role`. Principals can be user accounts, service accounts, Google +// groups, and domains (such as G Suite). A `role` is a named list of +// permissions; each `role` can be an IAM predefined role or a user-created +// custom role. For some types of Google Cloud resources, a `binding` can also +// specify a `condition`, which is a logical expression that allows access to a +// resource only if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or both. To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON +// example:** ``` { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": +// "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": +// "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com +// role: roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access after +// Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') +// etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, +// see the IAM documentation (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + // Bindings: Associates a list of `members`, or principals, with a `role`. + // Optionally, may specify a `condition` that determines how and when the + // `bindings` are applied. Each of the `bindings` must contain at least one + // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; + // up to 250 of these principals can be Google groups. Each occurrence of a + // principal counts towards these limits. For example, if the `bindings` grant + // 50 different roles to `user:alice@example.com`, and not to any other + // principal, then you can add another 1,450 principals to the `bindings` in + // the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + // Etag: `etag` is used for optimistic concurrency control as a way to help + // prevent simultaneous updates of a policy from overwriting each other. It is + // strongly suggested that systems make use of the `etag` in the + // read-modify-write cycle to perform policy updates in order to avoid race + // conditions: An `etag` is returned in the response to `getIamPolicy`, and + // systems are expected to put that etag in the request to `setIamPolicy` to + // ensure that their change will be applied to the same version of the policy. + // **Important:** If you use IAM Conditions, you must include the `etag` field + // whenever you call `setIamPolicy`. If you omit this field, then IAM allows + // you to overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + // Version: Specifies the format of the policy. Valid values are `0`, `1`, and + // `3`. Requests that specify an invalid value are rejected. Any operation that + // affects conditional role bindings must specify version `3`. This requirement + // applies to the following operations: * Getting a policy that includes a + // conditional role binding * Adding a conditional role binding to a policy * + // Changing a conditional role binding in a policy * Removing any role binding, + // with or without a condition, from a policy that includes conditions + // **Important:** If you use IAM Conditions, you must include the `etag` field + // whenever you call `setIamPolicy`. If you omit this field, then IAM allows + // you to overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. If a policy does not + // include any conditions, operations on that policy may specify any valid + // version or leave the field unset. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AuditConfigs") 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. "AuditConfigs") 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 Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Position: The position of the code comment. +type Position struct { + // Line: Required. The line number of the comment. Positive value means it's on + // the new side of the diff, negative value means it's on the old side. + Line int64 `json:"line,omitempty,string"` + // Path: Required. The path of the file. + Path string `json:"path,omitempty"` + // ForceSendFields is a list of field names (e.g. "Line") 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. "Line") 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 Position) MarshalJSON() ([]byte, error) { + type NoMethod Position + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PrivateConfig: PrivateConfig includes settings for private instance. +type PrivateConfig struct { + // CaPool: Optional. Immutable. CA pool resource, resource must in the format + // of `projects/{project}/locations/{location}/caPools/{ca_pool}`. + CaPool string `json:"caPool,omitempty"` + // HttpServiceAttachment: Output only. Service Attachment for HTTP, resource is + // in the format of + // `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}` + // . + HttpServiceAttachment string `json:"httpServiceAttachment,omitempty"` + // IsPrivate: Required. Immutable. Indicate if it's private instance. + IsPrivate bool `json:"isPrivate,omitempty"` + // PscAllowedProjects: Optional. Additional allowed projects for setting up PSC + // connections. Instance host project is automatically allowed and does not + // need to be included in this list. + PscAllowedProjects []string `json:"pscAllowedProjects,omitempty"` + // SshServiceAttachment: Output only. Service Attachment for SSH, resource is + // in the format of + // `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}` + // . + SshServiceAttachment string `json:"sshServiceAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaPool") 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. "CaPool") 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 PrivateConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrivateConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PullRequest: Metadata of a PullRequest. PullRequest is the request from a +// user to merge a branch (head) into another branch (base). +type PullRequest struct { + // Base: Required. The branch to merge changes in. + Base *Branch `json:"base,omitempty"` + // Body: Optional. The pull request body. Provides a detailed description of + // the changes. + Body string `json:"body,omitempty"` + // CloseTime: Output only. Close timestamp (if closed or merged). Cleared when + // pull request is re-opened. + CloseTime string `json:"closeTime,omitempty"` + // CreateTime: Output only. Creation timestamp. + CreateTime string `json:"createTime,omitempty"` + // Head: Immutable. The branch containing the changes to be merged. + Head *Branch `json:"head,omitempty"` + // Name: Output only. A unique identifier for a PullRequest. The number + // appended at the end is generated by the server. Format: + // `projects/{project}/locations/{location}/repositories/{repository}/pullReques + // ts/{pull_request_id}` + Name string `json:"name,omitempty"` + // State: Output only. State of the pull request (open, closed or merged). + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified. + // "OPEN" - An open pull request. + // "CLOSED" - A closed pull request. + // "MERGED" - A merged pull request. + State string `json:"state,omitempty"` + // Title: Required. The pull request title. + Title string `json:"title,omitempty"` + // UpdateTime: Output only. Last updated timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Base") 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. "Base") 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 PullRequest) MarshalJSON() ([]byte, error) { + type NoMethod PullRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PullRequestComment: PullRequestComment represents a comment on a pull +// request. +type PullRequestComment struct { + // Code: Optional. The comment on a code line. + Code *Code `json:"code,omitempty"` + // Comment: Optional. The general pull request comment. + Comment *Comment `json:"comment,omitempty"` + // CreateTime: Output only. Creation timestamp. + CreateTime string `json:"createTime,omitempty"` + // Name: Identifier. Unique identifier for the pull request comment. The + // comment id is generated by the server. Format: + // `projects/{project}/locations/{location}/repositories/{repository}/pullReques + // ts/{pull_request}/pullRequestComments/{comment_id}` + Name string `json:"name,omitempty"` + // Review: Optional. The review summary comment. + Review *Review `json:"review,omitempty"` + // UpdateTime: Output only. Last updated timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "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 PullRequestComment) MarshalJSON() ([]byte, error) { + type NoMethod PullRequestComment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type PushOption struct { + // BranchFilter: Optional. Trigger hook for matching branches only. Specified + // as glob pattern. If empty or *, events for all branches are reported. + // Examples: main, {main,release*}. See + // https://pkg.go.dev/github.com/gobwas/glob documentation. + BranchFilter string `json:"branchFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "BranchFilter") 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. "BranchFilter") 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 PushOption) MarshalJSON() ([]byte, error) { + type NoMethod PushOption + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Repository: Metadata of a Secure Source Manager repository. +type Repository struct { + // CreateTime: Output only. Create timestamp. + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. Description of the repository, which cannot exceed + // 500 characters. + Description string `json:"description,omitempty"` + // Etag: Optional. This checksum is computed by the server based on the value + // of other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + // InitialConfig: Input only. Initial configurations for the repository. + InitialConfig *InitialConfig `json:"initialConfig,omitempty"` + // Instance: Optional. The name of the instance in which the repository is + // hosted, formatted as + // `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + // When creating repository via securesourcemanager.googleapis.com, this field + // is used as input. When creating repository via *.sourcemanager.dev, this + // field is output only. + Instance string `json:"instance,omitempty"` + // Name: Optional. A unique identifier for a repository. The name should be of + // the format: + // `projects/{project}/locations/{location_id}/repositories/{repository_id}` + Name string `json:"name,omitempty"` + // Uid: Output only. Unique identifier of the repository. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. Update timestamp. + UpdateTime string `json:"updateTime,omitempty"` + // Uris: Output only. URIs for the repository. + Uris *URIs `json:"uris,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 Repository) MarshalJSON() ([]byte, error) { + type NoMethod Repository + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ResolvePullRequestCommentsRequest: The request to resolve multiple pull +// request comments. +type ResolvePullRequestCommentsRequest struct { + // AutoFill: Optional. If set, at least one comment in a thread is required, + // rest of the comments in the same thread will be automatically updated to + // resolved. If unset, all comments in the same thread need be present. + AutoFill bool `json:"autoFill,omitempty"` + // Names: Required. The names of the pull request comments to resolve. Format: + // `projects/{project_number}/locations/{location_id}/repositories/{repository_i + // d}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` Only + // comments from the same threads are allowed in the same request. + Names []string `json:"names,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoFill") 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. "AutoFill") 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 ResolvePullRequestCommentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ResolvePullRequestCommentsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Review: The review summary comment. +type Review struct { + // ActionType: Required. The review action type. + // + // Possible values: + // "ACTION_TYPE_UNSPECIFIED" - Unspecified. + // "COMMENT" - A general review comment. + // "CHANGE_REQUESTED" - Change required from this review. + // "APPROVED" - Change approved from this review. + ActionType string `json:"actionType,omitempty"` + // Body: Optional. The comment body. + Body string `json:"body,omitempty"` + // EffectiveCommitSha: Output only. The effective commit sha this review is + // pointing to. + EffectiveCommitSha string `json:"effectiveCommitSha,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActionType") 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. "ActionType") 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 Review) MarshalJSON() ([]byte, error) { + type NoMethod Review + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the `resource`. The + // size of the policy is limited to a few 10s of KB. An empty policy is a valid + // policy but certain Google Cloud services (such as Projects) might reject + // them. + Policy *Policy `json:"policy,omitempty"` + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to + // modify. Only the fields in the mask will be modified. If no mask is + // provided, the following default mask is used: `paths: "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Policy") 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. "Policy") 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 SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + 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) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. Permissions + // with wildcards (such as `*` or `storage.*`) are not allowed. For more + // information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that the + // caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TreeEntry: Represents an entry within a tree structure (like a Git tree). +type TreeEntry struct { + // Mode: Output only. The file mode as a string (e.g., "100644"). Indicates + // file type. Output-only. + Mode string `json:"mode,omitempty"` + // Path: Output only. The path of the file or directory within the tree (e.g., + // "src/main/java/MyClass.java"). Output-only. + Path string `json:"path,omitempty"` + // Sha: Output only. The SHA-1 hash of the object (unique identifier). + // Output-only. + Sha string `json:"sha,omitempty"` + // Size: Output only. The size of the object in bytes (only for blobs). + // Output-only. + Size int64 `json:"size,omitempty,string"` + // Type: Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. + // + // Possible values: + // "OBJECT_TYPE_UNSPECIFIED" - Default value, indicating the object type is + // unspecified. + // "TREE" - Represents a directory (folder). + // "BLOB" - Represents a file (contains file data). + // "COMMIT" - Represents a pointer to another repository (submodule). + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") 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. "Mode") 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 TreeEntry) MarshalJSON() ([]byte, error) { + type NoMethod TreeEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// URIs: URIs for the repository. +type URIs struct { + // Api: Output only. API is the URI for API access. + Api string `json:"api,omitempty"` + // GitHttps: Output only. git_https is the git HTTPS URI for git operations. + GitHttps string `json:"gitHttps,omitempty"` + // Html: Output only. HTML is the URI for user to view the repository in a + // browser. + Html string `json:"html,omitempty"` + // ForceSendFields is a list of field names (e.g. "Api") 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. "Api") 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 URIs) MarshalJSON() ([]byte, error) { + type NoMethod URIs + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// UnresolvePullRequestCommentsRequest: The request to unresolve multiple pull +// request comments. +type UnresolvePullRequestCommentsRequest struct { + // AutoFill: Optional. If set, at least one comment in a thread is required, + // rest of the comments in the same thread will be automatically updated to + // unresolved. If unset, all comments in the same thread need be present. + AutoFill bool `json:"autoFill,omitempty"` + // Names: Required. The names of the pull request comments to unresolve. + // Format: + // `projects/{project_number}/locations/{location_id}/repositories/{repository_i + // d}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` Only + // comments from the same threads are allowed in the same request. + Names []string `json:"names,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoFill") 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. "AutoFill") 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 UnresolvePullRequestCommentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod UnresolvePullRequestCommentsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// WorkforceIdentityFederationConfig: WorkforceIdentityFederationConfig allows +// this instance to support users from external identity providers. +type WorkforceIdentityFederationConfig struct { + // Enabled: Optional. Immutable. Whether Workforce Identity Federation is + // enabled. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 WorkforceIdentityFederationConfig) MarshalJSON() ([]byte, error) { + type NoMethod WorkforceIdentityFederationConfig + 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_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.get", "response", internallog.HTTPResponse(res, b)) + 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 +} + +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": A list +// of extra location types that should be used as conditions for controlling +// the visibility of the locations. +func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { + c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) + 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_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.list", "response", internallog.HTTPResponse(res, b)) + 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 ProjectsLocationsInstancesCreateCall struct { + s *Service + parent string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new instance in a given project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsInstancesCreateCall { + c := &ProjectsLocationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.instance = instance + return c +} + +// InstanceId sets the optional parameter "instanceId": Required. ID of the +// instance to be created. +func (c *ProjectsLocationsInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsInstancesCreateCall { + c.urlParams_.Set("instanceId", instanceId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInstancesCreateCall) RequestId(requestId string) *ProjectsLocationsInstancesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesCreateCall { + 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 *ProjectsLocationsInstancesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instance) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.instances.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 *ProjectsLocationsInstancesCreateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsInstancesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single instance. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Delete(name string) *ProjectsLocationsInstancesDeleteCall { + c := &ProjectsLocationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInstancesDeleteCall) RequestId(requestId string) *ProjectsLocationsInstancesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDeleteCall { + 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 *ProjectsLocationsInstancesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.instances.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 *ProjectsLocationsInstancesDeleteCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsInstancesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single instance. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall { + c := &ProjectsLocationsInstancesGetCall{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 *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall { + 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 *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall { + 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 *ProjectsLocationsInstancesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.instances.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Instance.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 *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, 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 := &Instance{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsInstancesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsInstancesService) GetIamPolicy(resource string) *ProjectsLocationsInstancesGetIamPolicyCall { + c := &ProjectsLocationsInstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsInstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsInstancesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetIamPolicyCall { + 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 *ProjectsLocationsInstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetIamPolicyCall { + 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 *ProjectsLocationsInstancesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.instances.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsInstancesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Instances in a given project and location. +// +// - parent: Parent value for ListInstancesRequest. +func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall { + c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter for filtering results. +func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results. +func (c *ProjectsLocationsInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall { + 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 *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall { + 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 *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall { + 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 *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall { + 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 *ProjectsLocationsInstancesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.instances.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListInstancesResponse.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 *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, 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 := &ListInstancesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) 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 ProjectsLocationsInstancesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsInstancesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsInstancesSetIamPolicyCall { + c := &ProjectsLocationsInstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInstancesSetIamPolicyCall { + 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 *ProjectsLocationsInstancesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.instances.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsInstancesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsInstancesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsInstancesTestIamPermissionsCall { + c := &ProjectsLocationsInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsInstancesTestIamPermissionsCall { + 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 *ProjectsLocationsInstancesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.instances.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.instances.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + 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_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b)) + 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_) + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.operations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b)) + 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_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b)) + 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_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b)) + 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 ProjectsLocationsRepositoriesCreateCall struct { + s *Service + parent string + repository *Repository + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new repository in a given project and location. The +// Repository.Instance field is required in the request body for requests using +// the securesourcemanager.googleapis.com endpoint. +// +// - parent: The project in which to create the repository. Values are of the +// form `projects/{project_number}/locations/{location_id}`. +func (r *ProjectsLocationsRepositoriesService) Create(parent string, repository *Repository) *ProjectsLocationsRepositoriesCreateCall { + c := &ProjectsLocationsRepositoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.repository = repository + return c +} + +// RepositoryId sets the optional parameter "repositoryId": Required. The ID to +// use for the repository, which will become the final component of the +// repository's resource name. This value should be 4-63 characters, and valid +// characters are /a-z-/. +func (c *ProjectsLocationsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsRepositoriesCreateCall { + c.urlParams_.Set("repositoryId", repositoryId) + 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 *ProjectsLocationsRepositoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCreateCall { + 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 *ProjectsLocationsRepositoriesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.repository) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/repositories") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.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 *ProjectsLocationsRepositoriesCreateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Repository. +// +// - name: Name of the repository to delete. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}`. +func (r *ProjectsLocationsRepositoriesService) Delete(name string) *ProjectsLocationsRepositoriesDeleteCall { + c := &ProjectsLocationsRepositoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the repository is not found, the request will succeed but no action will be +// taken on the server. +func (c *ProjectsLocationsRepositoriesDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsRepositoriesDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + 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 *ProjectsLocationsRepositoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesDeleteCall { + 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 *ProjectsLocationsRepositoriesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.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 *ProjectsLocationsRepositoriesDeleteCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesFetchBlobCall struct { + s *Service + repository string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// FetchBlob: Fetches a blob from a repository. +// +// - repository: The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}`. Specifies the repository containing the blob. +func (r *ProjectsLocationsRepositoriesService) FetchBlob(repository string) *ProjectsLocationsRepositoriesFetchBlobCall { + c := &ProjectsLocationsRepositoriesFetchBlobCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.repository = repository + return c +} + +// Sha sets the optional parameter "sha": Required. The SHA-1 hash of the blob +// to retrieve. +func (c *ProjectsLocationsRepositoriesFetchBlobCall) Sha(sha string) *ProjectsLocationsRepositoriesFetchBlobCall { + c.urlParams_.Set("sha", sha) + 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 *ProjectsLocationsRepositoriesFetchBlobCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFetchBlobCall { + 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 *ProjectsLocationsRepositoriesFetchBlobCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFetchBlobCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesFetchBlobCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFetchBlobCall { + 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 *ProjectsLocationsRepositoriesFetchBlobCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesFetchBlobCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+repository}:fetchBlob") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "repository": c.repository, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.fetchBlob", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.fetchBlob" call. +// Any non-2xx status code is an error. Response headers are in either +// *FetchBlobResponse.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 *ProjectsLocationsRepositoriesFetchBlobCall) Do(opts ...googleapi.CallOption) (*FetchBlobResponse, 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 := &FetchBlobResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.fetchBlob", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesFetchTreeCall struct { + s *Service + repository string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// FetchTree: Fetches a tree from a repository. +// +// - repository: The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}`. Specifies the repository to fetch the tree from. +func (r *ProjectsLocationsRepositoriesService) FetchTree(repository string) *ProjectsLocationsRepositoriesFetchTreeCall { + c := &ProjectsLocationsRepositoriesFetchTreeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.repository = repository + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, at most 10,000 items +// will be returned. +func (c *ProjectsLocationsRepositoriesFetchTreeCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesFetchTreeCall { + 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 *ProjectsLocationsRepositoriesFetchTreeCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesFetchTreeCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Recursive sets the optional parameter "recursive": If true, include all +// subfolders and their files in the response. If false, only the immediate +// children are returned. +func (c *ProjectsLocationsRepositoriesFetchTreeCall) Recursive(recursive bool) *ProjectsLocationsRepositoriesFetchTreeCall { + c.urlParams_.Set("recursive", fmt.Sprint(recursive)) + return c +} + +// Ref sets the optional parameter "ref": `ref` can be a SHA-1 hash, a branch +// name, or a tag. Specifies which tree to fetch. If not specified, the default +// branch will be used. +func (c *ProjectsLocationsRepositoriesFetchTreeCall) Ref(ref string) *ProjectsLocationsRepositoriesFetchTreeCall { + c.urlParams_.Set("ref", ref) + 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 *ProjectsLocationsRepositoriesFetchTreeCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFetchTreeCall { + 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 *ProjectsLocationsRepositoriesFetchTreeCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFetchTreeCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesFetchTreeCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFetchTreeCall { + 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 *ProjectsLocationsRepositoriesFetchTreeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesFetchTreeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+repository}:fetchTree") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "repository": c.repository, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.fetchTree", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.fetchTree" call. +// Any non-2xx status code is an error. Response headers are in either +// *FetchTreeResponse.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 *ProjectsLocationsRepositoriesFetchTreeCall) Do(opts ...googleapi.CallOption) (*FetchTreeResponse, 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 := &FetchTreeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.fetchTree", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsRepositoriesFetchTreeCall) Pages(ctx context.Context, f func(*FetchTreeResponse) 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 ProjectsLocationsRepositoriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets metadata of a repository. +// +// - name: Name of the repository to retrieve. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}`. +func (r *ProjectsLocationsRepositoriesService) Get(name string) *ProjectsLocationsRepositoriesGetCall { + c := &ProjectsLocationsRepositoriesGetCall{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 *ProjectsLocationsRepositoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetCall { + 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 *ProjectsLocationsRepositoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetCall { + 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 *ProjectsLocationsRepositoriesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Repository.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 *ProjectsLocationsRepositoriesGetCall) Do(opts ...googleapi.CallOption) (*Repository, 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 := &Repository{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Get IAM policy for a repository. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsRepositoriesService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesGetIamPolicyCall { + c := &ProjectsLocationsRepositoriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Repositories in a given project and location. The instance field +// is required in the query parameter for requests using the +// securesourcemanager.googleapis.com endpoint. +// +// - parent: Parent value for ListRepositoriesRequest. +func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLocationsRepositoriesListCall { + c := &ProjectsLocationsRepositoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter results. +func (c *ProjectsLocationsRepositoriesListCall) Filter(filter string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// Instance sets the optional parameter "instance": The name of the instance in +// which the repository is hosted, formatted as +// `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. +// When listing repositories via securesourcemanager.googleapis.com, this field +// is required. When listing repositories via *.sourcemanager.dev, this field +// is ignored. +func (c *ProjectsLocationsRepositoriesListCall) Instance(instance string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("instance", instance) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall { + 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 *ProjectsLocationsRepositoriesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesListCall { + 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 *ProjectsLocationsRepositoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesListCall { + 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 *ProjectsLocationsRepositoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesListCall { + 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 *ProjectsLocationsRepositoriesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/repositories") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListRepositoriesResponse.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 *ProjectsLocationsRepositoriesListCall) Do(opts ...googleapi.CallOption) (*ListRepositoriesResponse, 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 := &ListRepositoriesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsRepositoriesListCall) Pages(ctx context.Context, f func(*ListRepositoriesResponse) 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 ProjectsLocationsRepositoriesPatchCall struct { + s *Service + nameid string + repository *Repository + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the metadata of a repository. +// +// - name: Optional. A unique identifier for a repository. The name should be +// of the format: +// `projects/{project}/locations/{location_id}/repositories/{repository_id}`. +func (r *ProjectsLocationsRepositoriesService) Patch(nameid string, repository *Repository) *ProjectsLocationsRepositoriesPatchCall { + c := &ProjectsLocationsRepositoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.repository = repository + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the repository 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 *ProjectsLocationsRepositoriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": False by default. +// If set to true, the request is validated and the user is provided with an +// expected result, but no actual change is made. +func (c *ProjectsLocationsRepositoriesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRepositoriesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsRepositoriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPatchCall { + 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 *ProjectsLocationsRepositoriesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.repository) + 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.nameid, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.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 *ProjectsLocationsRepositoriesPatchCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Set IAM policy on a repository. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsRepositoriesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesSetIamPolicyCall { + c := &ProjectsLocationsRepositoriesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesSetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Test IAM permissions on a repository. IAM permission +// checks are not required on this method. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsRepositoriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRepositoriesTestIamPermissionsCall { + c := &ProjectsLocationsRepositoriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesTestIamPermissionsCall { + 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 *ProjectsLocationsRepositoriesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesBranchRulesCreateCall struct { + s *Service + parent string + branchrule *BranchRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: CreateBranchRule creates a branch rule in a given repository. +// +// - parent: . +func (r *ProjectsLocationsRepositoriesBranchRulesService) Create(parent string, branchrule *BranchRule) *ProjectsLocationsRepositoriesBranchRulesCreateCall { + c := &ProjectsLocationsRepositoriesBranchRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.branchrule = branchrule + return c +} + +// BranchRuleId sets the optional parameter "branchRuleId": +func (c *ProjectsLocationsRepositoriesBranchRulesCreateCall) BranchRuleId(branchRuleId string) *ProjectsLocationsRepositoriesBranchRulesCreateCall { + c.urlParams_.Set("branchRuleId", branchRuleId) + 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 *ProjectsLocationsRepositoriesBranchRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesBranchRulesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesBranchRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesBranchRulesCreateCall { + 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 *ProjectsLocationsRepositoriesBranchRulesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesBranchRulesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.branchrule) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/branchRules") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.branchRules.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 *ProjectsLocationsRepositoriesBranchRulesCreateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesBranchRulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: DeleteBranchRule deletes a branch rule. +// +// - name: . +func (r *ProjectsLocationsRepositoriesBranchRulesService) Delete(name string) *ProjectsLocationsRepositoriesBranchRulesDeleteCall { + c := &ProjectsLocationsRepositoriesBranchRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the branch rule is not found, the request will succeed but no action will be +// taken on the server. +func (c *ProjectsLocationsRepositoriesBranchRulesDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsRepositoriesBranchRulesDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + 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 *ProjectsLocationsRepositoriesBranchRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesBranchRulesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesBranchRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesBranchRulesDeleteCall { + 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 *ProjectsLocationsRepositoriesBranchRulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesBranchRulesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.branchRules.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 *ProjectsLocationsRepositoriesBranchRulesDeleteCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesBranchRulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: GetBranchRule gets a branch rule. +// +// - name: Name of the repository to retrieve. The format is +// `projects/{project}/locations/{location}/repositories/{repository}/branchRu +// les/{branch_rule}`. +func (r *ProjectsLocationsRepositoriesBranchRulesService) Get(name string) *ProjectsLocationsRepositoriesBranchRulesGetCall { + c := &ProjectsLocationsRepositoriesBranchRulesGetCall{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 *ProjectsLocationsRepositoriesBranchRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesBranchRulesGetCall { + 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 *ProjectsLocationsRepositoriesBranchRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesBranchRulesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesBranchRulesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesBranchRulesGetCall { + 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 *ProjectsLocationsRepositoriesBranchRulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesBranchRulesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.branchRules.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BranchRule.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 *ProjectsLocationsRepositoriesBranchRulesGetCall) Do(opts ...googleapi.CallOption) (*BranchRule, 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 := &BranchRule{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesBranchRulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListBranchRules lists branch rules in a given repository. +// +// - parent: . +func (r *ProjectsLocationsRepositoriesBranchRulesService) List(parent string) *ProjectsLocationsRepositoriesBranchRulesListCall { + c := &ProjectsLocationsRepositoriesBranchRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": +func (c *ProjectsLocationsRepositoriesBranchRulesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesBranchRulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": +func (c *ProjectsLocationsRepositoriesBranchRulesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesBranchRulesListCall { + 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 *ProjectsLocationsRepositoriesBranchRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesBranchRulesListCall { + 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 *ProjectsLocationsRepositoriesBranchRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesBranchRulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesBranchRulesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesBranchRulesListCall { + 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 *ProjectsLocationsRepositoriesBranchRulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesBranchRulesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/branchRules") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.branchRules.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBranchRulesResponse.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 *ProjectsLocationsRepositoriesBranchRulesListCall) Do(opts ...googleapi.CallOption) (*ListBranchRulesResponse, 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 := &ListBranchRulesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsRepositoriesBranchRulesListCall) Pages(ctx context.Context, f func(*ListBranchRulesResponse) 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 ProjectsLocationsRepositoriesBranchRulesPatchCall struct { + s *Service + nameid string + branchrule *BranchRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: UpdateBranchRule updates a branch rule. +// +// - name: Optional. A unique identifier for a BranchRule. The name should be +// of the format: +// `projects/{project}/locations/{location}/repositories/{repository}/branchRu +// les/{branch_rule}`. +func (r *ProjectsLocationsRepositoriesBranchRulesService) Patch(nameid string, branchrule *BranchRule) *ProjectsLocationsRepositoriesBranchRulesPatchCall { + c := &ProjectsLocationsRepositoriesBranchRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.branchrule = branchrule + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the branchRule 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. The special value "*" means full replacement. +func (c *ProjectsLocationsRepositoriesBranchRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesBranchRulesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not actually post it. +// (https://google.aip.dev/163, for declarative friendly) +func (c *ProjectsLocationsRepositoriesBranchRulesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRepositoriesBranchRulesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsRepositoriesBranchRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesBranchRulesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesBranchRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesBranchRulesPatchCall { + 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 *ProjectsLocationsRepositoriesBranchRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesBranchRulesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.branchrule) + 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.nameid, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.branchRules.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 *ProjectsLocationsRepositoriesBranchRulesPatchCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.branchRules.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesHooksCreateCall struct { + s *Service + parent string + hook *Hook + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new hook in a given repository. +// +// - parent: The repository in which to create the hook. Values are of the form +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}`. +func (r *ProjectsLocationsRepositoriesHooksService) Create(parent string, hook *Hook) *ProjectsLocationsRepositoriesHooksCreateCall { + c := &ProjectsLocationsRepositoriesHooksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.hook = hook + return c +} + +// HookId sets the optional parameter "hookId": Required. The ID to use for the +// hook, which will become the final component of the hook's resource name. +// This value restricts to lower-case letters, numbers, and hyphen, with the +// first character a letter, the last a letter or a number, and a 63 character +// maximum. +func (c *ProjectsLocationsRepositoriesHooksCreateCall) HookId(hookId string) *ProjectsLocationsRepositoriesHooksCreateCall { + c.urlParams_.Set("hookId", hookId) + 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 *ProjectsLocationsRepositoriesHooksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesHooksCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesHooksCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesHooksCreateCall { + 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 *ProjectsLocationsRepositoriesHooksCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesHooksCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hook) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hooks") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.hooks.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 *ProjectsLocationsRepositoriesHooksCreateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesHooksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Hook. +// +// - name: Name of the hook to delete. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/hooks/{hook_id}`. +func (r *ProjectsLocationsRepositoriesHooksService) Delete(name string) *ProjectsLocationsRepositoriesHooksDeleteCall { + c := &ProjectsLocationsRepositoriesHooksDeleteCall{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 *ProjectsLocationsRepositoriesHooksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesHooksDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesHooksDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesHooksDeleteCall { + 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 *ProjectsLocationsRepositoriesHooksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesHooksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.hooks.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 *ProjectsLocationsRepositoriesHooksDeleteCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesHooksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets metadata of a hook. +// +// - name: Name of the hook to retrieve. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/hooks/{hook_id}`. +func (r *ProjectsLocationsRepositoriesHooksService) Get(name string) *ProjectsLocationsRepositoriesHooksGetCall { + c := &ProjectsLocationsRepositoriesHooksGetCall{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 *ProjectsLocationsRepositoriesHooksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesHooksGetCall { + 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 *ProjectsLocationsRepositoriesHooksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesHooksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesHooksGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesHooksGetCall { + 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 *ProjectsLocationsRepositoriesHooksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesHooksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.hooks.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Hook.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 *ProjectsLocationsRepositoriesHooksGetCall) Do(opts ...googleapi.CallOption) (*Hook, 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 := &Hook{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesHooksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists hooks in a given repository. +// +// - parent: Parent value for ListHooksRequest. +func (r *ProjectsLocationsRepositoriesHooksService) List(parent string) *ProjectsLocationsRepositoriesHooksListCall { + c := &ProjectsLocationsRepositoriesHooksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsRepositoriesHooksListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesHooksListCall { + 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 *ProjectsLocationsRepositoriesHooksListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesHooksListCall { + 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 *ProjectsLocationsRepositoriesHooksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesHooksListCall { + 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 *ProjectsLocationsRepositoriesHooksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesHooksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesHooksListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesHooksListCall { + 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 *ProjectsLocationsRepositoriesHooksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesHooksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hooks") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.hooks.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListHooksResponse.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 *ProjectsLocationsRepositoriesHooksListCall) Do(opts ...googleapi.CallOption) (*ListHooksResponse, 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 := &ListHooksResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsRepositoriesHooksListCall) Pages(ctx context.Context, f func(*ListHooksResponse) 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 ProjectsLocationsRepositoriesHooksPatchCall struct { + s *Service + nameid string + hook *Hook + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the metadata of a hook. +// +// - name: Identifier. A unique identifier for a Hook. The name should be of +// the format: +// `projects/{project}/locations/{location_id}/repositories/{repository_id}/ho +// oks/{hook_id}`. +func (r *ProjectsLocationsRepositoriesHooksService) Patch(nameid string, hook *Hook) *ProjectsLocationsRepositoriesHooksPatchCall { + c := &ProjectsLocationsRepositoriesHooksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.hook = hook + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the hook 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. The special value "*" means full replacement. +func (c *ProjectsLocationsRepositoriesHooksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesHooksPatchCall { + 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 *ProjectsLocationsRepositoriesHooksPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesHooksPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesHooksPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesHooksPatchCall { + 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 *ProjectsLocationsRepositoriesHooksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesHooksPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hook) + 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.nameid, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.hooks.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 *ProjectsLocationsRepositoriesHooksPatchCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.hooks.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesCloseCall struct { + s *Service + name string + closeissuerequest *CloseIssueRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Close: Closes an issue. +// +// - name: Name of the issue to close. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/issues/{issue_id}`. +func (r *ProjectsLocationsRepositoriesIssuesService) Close(name string, closeissuerequest *CloseIssueRequest) *ProjectsLocationsRepositoriesIssuesCloseCall { + c := &ProjectsLocationsRepositoriesIssuesCloseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.closeissuerequest = closeissuerequest + 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 *ProjectsLocationsRepositoriesIssuesCloseCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesCloseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesCloseCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesCloseCall { + 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 *ProjectsLocationsRepositoriesIssuesCloseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesCloseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.closeissuerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:close") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.close", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.close" 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 *ProjectsLocationsRepositoriesIssuesCloseCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.close", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesCreateCall struct { + s *Service + parent string + issue *Issue + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an issue. +// +// - parent: The repository in which to create the issue. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}`. +func (r *ProjectsLocationsRepositoriesIssuesService) Create(parent string, issue *Issue) *ProjectsLocationsRepositoriesIssuesCreateCall { + c := &ProjectsLocationsRepositoriesIssuesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.issue = issue + 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 *ProjectsLocationsRepositoriesIssuesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesCreateCall { + 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 *ProjectsLocationsRepositoriesIssuesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.issue) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/issues") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.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 *ProjectsLocationsRepositoriesIssuesCreateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an issue. +// +// - name: Name of the issue to delete. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/issues/{issue_id}`. +func (r *ProjectsLocationsRepositoriesIssuesService) Delete(name string) *ProjectsLocationsRepositoriesIssuesDeleteCall { + c := &ProjectsLocationsRepositoriesIssuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the issue. If +// the etag is provided and does not match the current etag of the issue, +// deletion will be blocked and an ABORTED error will be returned. +func (c *ProjectsLocationsRepositoriesIssuesDeleteCall) Etag(etag string) *ProjectsLocationsRepositoriesIssuesDeleteCall { + c.urlParams_.Set("etag", etag) + 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 *ProjectsLocationsRepositoriesIssuesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesDeleteCall { + 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 *ProjectsLocationsRepositoriesIssuesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.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 *ProjectsLocationsRepositoriesIssuesDeleteCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an issue. +// +// - name: Name of the issue to retrieve. The format is +// `projects/{project}/locations/{location}/repositories/{repository}/issues/{ +// issue_id}`. +func (r *ProjectsLocationsRepositoriesIssuesService) Get(name string) *ProjectsLocationsRepositoriesIssuesGetCall { + c := &ProjectsLocationsRepositoriesIssuesGetCall{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 *ProjectsLocationsRepositoriesIssuesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesGetCall { + 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 *ProjectsLocationsRepositoriesIssuesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesIssuesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesGetCall { + 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 *ProjectsLocationsRepositoriesIssuesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Issue.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 *ProjectsLocationsRepositoriesIssuesGetCall) Do(opts ...googleapi.CallOption) (*Issue, 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 := &Issue{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists issues in a repository. +// +// - parent: The repository in which to list issues. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}`. +func (r *ProjectsLocationsRepositoriesIssuesService) List(parent string) *ProjectsLocationsRepositoriesIssuesListCall { + c := &ProjectsLocationsRepositoriesIssuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Used to filter the resulting +// issues list. +func (c *ProjectsLocationsRepositoriesIssuesListCall) Filter(filter string) *ProjectsLocationsRepositoriesIssuesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsRepositoriesIssuesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesIssuesListCall { + 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 *ProjectsLocationsRepositoriesIssuesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesIssuesListCall { + 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 *ProjectsLocationsRepositoriesIssuesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesListCall { + 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 *ProjectsLocationsRepositoriesIssuesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesIssuesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesListCall { + 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 *ProjectsLocationsRepositoriesIssuesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/issues") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListIssuesResponse.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 *ProjectsLocationsRepositoriesIssuesListCall) Do(opts ...googleapi.CallOption) (*ListIssuesResponse, 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 := &ListIssuesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsRepositoriesIssuesListCall) Pages(ctx context.Context, f func(*ListIssuesResponse) 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 ProjectsLocationsRepositoriesIssuesOpenCall struct { + s *Service + name string + openissuerequest *OpenIssueRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Open: Opens an issue. +// +// - name: Name of the issue to open. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/issues/{issue_id}`. +func (r *ProjectsLocationsRepositoriesIssuesService) Open(name string, openissuerequest *OpenIssueRequest) *ProjectsLocationsRepositoriesIssuesOpenCall { + c := &ProjectsLocationsRepositoriesIssuesOpenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.openissuerequest = openissuerequest + 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 *ProjectsLocationsRepositoriesIssuesOpenCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesOpenCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesOpenCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesOpenCall { + 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 *ProjectsLocationsRepositoriesIssuesOpenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesOpenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.openissuerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:open") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.open", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.open" 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 *ProjectsLocationsRepositoriesIssuesOpenCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.open", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesPatchCall struct { + s *Service + nameid string + issue *Issue + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a issue. +// +// - name: Identifier. Unique identifier for an issue. The issue id is +// generated by the server. Format: +// `projects/{project}/locations/{location}/repositories/{repository}/issues/{ +// issue_id}`. +func (r *ProjectsLocationsRepositoriesIssuesService) Patch(nameid string, issue *Issue) *ProjectsLocationsRepositoriesIssuesPatchCall { + c := &ProjectsLocationsRepositoriesIssuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.issue = issue + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the issue 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. The +// special value "*" means full replacement. +func (c *ProjectsLocationsRepositoriesIssuesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesIssuesPatchCall { + 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 *ProjectsLocationsRepositoriesIssuesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesPatchCall { + 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 *ProjectsLocationsRepositoriesIssuesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.issue) + 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.nameid, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.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 *ProjectsLocationsRepositoriesIssuesPatchCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall struct { + s *Service + parent string + issuecomment *IssueComment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an issue comment. +// +// - parent: The issue in which to create the issue comment. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/issues/{issue_id}`. +func (r *ProjectsLocationsRepositoriesIssuesIssueCommentsService) Create(parent string, issuecomment *IssueComment) *ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall { + c := &ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.issuecomment = issuecomment + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.issuecomment) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/issueComments") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.issueComments.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 *ProjectsLocationsRepositoriesIssuesIssueCommentsCreateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an issue comment. +// +// - name: Name of the issue comment to delete. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/issues/{issue_id}/issueComments/{comment_id}`. +func (r *ProjectsLocationsRepositoriesIssuesIssueCommentsService) Delete(name string) *ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall { + c := &ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall{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 *ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.issueComments.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 *ProjectsLocationsRepositoriesIssuesIssueCommentsDeleteCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an issue comment. +// +// - name: Name of the issue comment to retrieve. The format is +// `projects/{project}/locations/{location}/repositories/{repository}/issues/{ +// issue_id}/issueComments/{comment_id}`. +func (r *ProjectsLocationsRepositoriesIssuesIssueCommentsService) Get(name string) *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall { + c := &ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall{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 *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.issueComments.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *IssueComment.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 *ProjectsLocationsRepositoriesIssuesIssueCommentsGetCall) Do(opts ...googleapi.CallOption) (*IssueComment, 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 := &IssueComment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesIssuesIssueCommentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists comments in an issue. +// +// - parent: The issue in which to list the comments. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/issues/{issue_id}`. +func (r *ProjectsLocationsRepositoriesIssuesIssueCommentsService) List(parent string) *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall { + c := &ProjectsLocationsRepositoriesIssuesIssueCommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/issueComments") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.issueComments.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListIssueCommentsResponse.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 *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall) Do(opts ...googleapi.CallOption) (*ListIssueCommentsResponse, 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 := &ListIssueCommentsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsListCall) Pages(ctx context.Context, f func(*ListIssueCommentsResponse) 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 ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall struct { + s *Service + nameid string + issuecomment *IssueComment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an issue comment. +// +// - name: Identifier. Unique identifier for an issue comment. The comment id +// is generated by the server. Format: +// `projects/{project}/locations/{location}/repositories/{repository}/issues/{ +// issue}/issueComments/{comment_id}`. +func (r *ProjectsLocationsRepositoriesIssuesIssueCommentsService) Patch(nameid string, issuecomment *IssueComment) *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall { + c := &ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.issuecomment = issuecomment + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the issue comment 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. The special value "*" means full replacement. +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall { + 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 *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.issuecomment) + 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.nameid, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.issues.issueComments.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 *ProjectsLocationsRepositoriesIssuesIssueCommentsPatchCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.issues.issueComments.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsCloseCall struct { + s *Service + name string + closepullrequestrequest *ClosePullRequestRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Close: Closes a pull request without merging. +// +// - name: The pull request to close. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsService) Close(name string, closepullrequestrequest *ClosePullRequestRequest) *ProjectsLocationsRepositoriesPullRequestsCloseCall { + c := &ProjectsLocationsRepositoriesPullRequestsCloseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.closepullrequestrequest = closepullrequestrequest + 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 *ProjectsLocationsRepositoriesPullRequestsCloseCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsCloseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsCloseCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsCloseCall { + 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 *ProjectsLocationsRepositoriesPullRequestsCloseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsCloseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.closepullrequestrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:close") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.close", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.close" 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 *ProjectsLocationsRepositoriesPullRequestsCloseCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.close", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsCreateCall struct { + s *Service + parent string + pullrequest *PullRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a pull request. +// +// - parent: The repository that the pull request is created from. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsService) Create(parent string, pullrequest *PullRequest) *ProjectsLocationsRepositoriesPullRequestsCreateCall { + c := &ProjectsLocationsRepositoriesPullRequestsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.pullrequest = pullrequest + 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 *ProjectsLocationsRepositoriesPullRequestsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsCreateCall { + 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 *ProjectsLocationsRepositoriesPullRequestsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.pullrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pullRequests") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.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 *ProjectsLocationsRepositoriesPullRequestsCreateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a pull request. +// +// - name: Name of the pull request to retrieve. The format is +// `projects/{project}/locations/{location}/repositories/{repository}/pullRequ +// ests/{pull_request}`. +func (r *ProjectsLocationsRepositoriesPullRequestsService) Get(name string) *ProjectsLocationsRepositoriesPullRequestsGetCall { + c := &ProjectsLocationsRepositoriesPullRequestsGetCall{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 *ProjectsLocationsRepositoriesPullRequestsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsGetCall { + 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 *ProjectsLocationsRepositoriesPullRequestsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPullRequestsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsGetCall { + 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 *ProjectsLocationsRepositoriesPullRequestsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *PullRequest.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 *ProjectsLocationsRepositoriesPullRequestsGetCall) Do(opts ...googleapi.CallOption) (*PullRequest, 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 := &PullRequest{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists pull requests in a repository. +// +// - parent: The repository in which to list pull requests. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsService) List(parent string) *ProjectsLocationsRepositoriesPullRequestsListCall { + c := &ProjectsLocationsRepositoriesPullRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsRepositoriesPullRequestsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPullRequestsListCall { + 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 *ProjectsLocationsRepositoriesPullRequestsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPullRequestsListCall { + 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 *ProjectsLocationsRepositoriesPullRequestsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsListCall { + 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 *ProjectsLocationsRepositoriesPullRequestsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPullRequestsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsListCall { + 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 *ProjectsLocationsRepositoriesPullRequestsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pullRequests") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListPullRequestsResponse.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 *ProjectsLocationsRepositoriesPullRequestsListCall) Do(opts ...googleapi.CallOption) (*ListPullRequestsResponse, 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 := &ListPullRequestsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsRepositoriesPullRequestsListCall) Pages(ctx context.Context, f func(*ListPullRequestsResponse) 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 ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListFileDiffs: Lists a pull request's file diffs. +// +// - name: The pull request to list file diffs for. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsService) ListFileDiffs(name string) *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall { + c := &ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall { + 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 *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall { + 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 *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall { + 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 *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall { + 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 *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listFileDiffs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.listFileDiffs", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.listFileDiffs" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListPullRequestFileDiffsResponse.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 *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall) Do(opts ...googleapi.CallOption) (*ListPullRequestFileDiffsResponse, 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 := &ListPullRequestFileDiffsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.listFileDiffs", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsRepositoriesPullRequestsListFileDiffsCall) Pages(ctx context.Context, f func(*ListPullRequestFileDiffsResponse) 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 ProjectsLocationsRepositoriesPullRequestsMergeCall struct { + s *Service + name string + mergepullrequestrequest *MergePullRequestRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Merge: Merges a pull request. +// +// - name: The pull request to merge. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsService) Merge(name string, mergepullrequestrequest *MergePullRequestRequest) *ProjectsLocationsRepositoriesPullRequestsMergeCall { + c := &ProjectsLocationsRepositoriesPullRequestsMergeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.mergepullrequestrequest = mergepullrequestrequest + 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 *ProjectsLocationsRepositoriesPullRequestsMergeCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsMergeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsMergeCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsMergeCall { + 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 *ProjectsLocationsRepositoriesPullRequestsMergeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsMergeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.mergepullrequestrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:merge") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.merge", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.merge" 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 *ProjectsLocationsRepositoriesPullRequestsMergeCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.merge", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsOpenCall struct { + s *Service + name string + openpullrequestrequest *OpenPullRequestRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Open: Opens a pull request. +// +// - name: The pull request to open. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsService) Open(name string, openpullrequestrequest *OpenPullRequestRequest) *ProjectsLocationsRepositoriesPullRequestsOpenCall { + c := &ProjectsLocationsRepositoriesPullRequestsOpenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.openpullrequestrequest = openpullrequestrequest + 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 *ProjectsLocationsRepositoriesPullRequestsOpenCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsOpenCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsOpenCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsOpenCall { + 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 *ProjectsLocationsRepositoriesPullRequestsOpenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsOpenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.openpullrequestrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:open") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.open", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.open" 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 *ProjectsLocationsRepositoriesPullRequestsOpenCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.open", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsPatchCall struct { + s *Service + nameid string + pullrequest *PullRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a pull request. +// +// - name: Output only. A unique identifier for a PullRequest. The number +// appended at the end is generated by the server. Format: +// `projects/{project}/locations/{location}/repositories/{repository}/pullRequ +// ests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsService) Patch(nameid string, pullrequest *PullRequest) *ProjectsLocationsRepositoriesPullRequestsPatchCall { + c := &ProjectsLocationsRepositoriesPullRequestsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.pullrequest = pullrequest + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the pull request 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. The special value "*" means full replacement. +func (c *ProjectsLocationsRepositoriesPullRequestsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPullRequestsPatchCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsPatchCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.pullrequest) + 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.nameid, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.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 *ProjectsLocationsRepositoriesPullRequestsPatchCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall struct { + s *Service + parent string + batchcreatepullrequestcommentsrequest *BatchCreatePullRequestCommentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Batch creates pull request comments. +// +// - parent: The pull request in which to create the pull request comments. +// Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService) BatchCreate(parent string, batchcreatepullrequestcommentsrequest *BatchCreatePullRequestCommentsRequest) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall { + c := &ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchcreatepullrequestcommentsrequest = batchcreatepullrequestcommentsrequest + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.batchcreatepullrequestcommentsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pullRequestComments: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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.batchCreate", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.batchCreate" 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsBatchCreateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.batchCreate", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall struct { + s *Service + parent string + pullrequestcomment *PullRequestComment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a pull request comment. +// +// - parent: The pull request in which to create the pull request comment. +// Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService) Create(parent string, pullrequestcomment *PullRequestComment) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall { + c := &ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.pullrequestcomment = pullrequestcomment + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.pullrequestcomment) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pullRequestComments") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsCreateCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a pull request comment. +// +// - name: Name of the pull request comment to delete. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService) Delete(name string) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall { + c := &ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall{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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsDeleteCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a pull request comment. +// +// - name: Name of the pull request comment to retrieve. The format is +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService) Get(name string) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall { + c := &ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall{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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *PullRequestComment.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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsGetCall) Do(opts ...googleapi.CallOption) (*PullRequestComment, 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 := &PullRequestComment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists pull request comments. +// +// - parent: The pull request in which to list pull request comments. Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService) List(parent string) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall { + c := &ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. If +// unspecified, at most 100 pull request comments will be returned. The maximum +// value is 100; values above 100 will be coerced to 100. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pullRequestComments") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListPullRequestCommentsResponse.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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall) Do(opts ...googleapi.CallOption) (*ListPullRequestCommentsResponse, 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 := &ListPullRequestCommentsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.list", "response", internallog.HTTPResponse(res, b)) + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsListCall) Pages(ctx context.Context, f func(*ListPullRequestCommentsResponse) 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 ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall struct { + s *Service + nameid string + pullrequestcomment *PullRequestComment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a pull request comment. +// +// - name: Identifier. Unique identifier for the pull request comment. The +// comment id is generated by the server. Format: +// `projects/{project}/locations/{location}/repositories/{repository}/pullRequ +// ests/{pull_request}/pullRequestComments/{comment_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService) Patch(nameid string, pullrequestcomment *PullRequestComment) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall { + c := &ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.pullrequestcomment = pullrequestcomment + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the pull request comment resource by +// the update. Updatable fields are `body`. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.pullrequestcomment) + 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.nameid, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsPatchCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall struct { + s *Service + parent string + resolvepullrequestcommentsrequest *ResolvePullRequestCommentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resolve: Resolves pull request comments. +// +// - parent: The pull request in which to resolve the pull request comments. +// Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService) Resolve(parent string, resolvepullrequestcommentsrequest *ResolvePullRequestCommentsRequest) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall { + c := &ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.resolvepullrequestcommentsrequest = resolvepullrequestcommentsrequest + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resolvepullrequestcommentsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pullRequestComments:resolve") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.resolve", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.resolve" 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsResolveCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.resolve", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall struct { + s *Service + parent string + unresolvepullrequestcommentsrequest *UnresolvePullRequestCommentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Unresolve: Unresolves pull request comment. +// +// - parent: The pull request in which to resolve the pull request comments. +// Format: +// `projects/{project_number}/locations/{location_id}/repositories/{repository +// _id}/pullRequests/{pull_request_id}`. +func (r *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsService) Unresolve(parent string, unresolvepullrequestcommentsrequest *UnresolvePullRequestCommentsRequest) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall { + c := &ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.unresolvepullrequestcommentsrequest = unresolvepullrequestcommentsrequest + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall { + 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.unresolvepullrequestcommentsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pullRequestComments:unresolve") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.unresolve", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.unresolve" 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 *ProjectsLocationsRepositoriesPullRequestsPullRequestCommentsUnresolveCall) 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 + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "securesourcemanager.projects.locations.repositories.pullRequests.pullRequestComments.unresolve", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index d152da2822..c3bc2c22c2 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -454,7 +454,7 @@ } } }, - "revision": "20250624", + "revision": "20250725", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -670,13 +670,21 @@ "DEVICE_FORM_FACTOR_UNSPECIFIED", "PHONE", "TABLET", - "WEARABLE" + "WEARABLE", + "TV", + "AUTOMOTIVE", + "DESKTOP", + "XR" ], "enumDescriptions": [ "Do not use. For proto versioning only.", "This device has the shape of a phone.", "This device has the shape of a tablet.", - "This device has the shape of a watch or other wearable." + "This device has the shape of a watch or other wearable.", + "This device has a television form factor.", + "This device has an automotive form factor.", + "This device has a desktop form factor.", + "This device has an Extended Reality form factor." ], "type": "string" }, @@ -1540,13 +1548,21 @@ "DEVICE_FORM_FACTOR_UNSPECIFIED", "PHONE", "TABLET", - "WEARABLE" + "WEARABLE", + "TV", + "AUTOMOTIVE", + "DESKTOP", + "XR" ], "enumDescriptions": [ "Do not use. For proto versioning only.", "This device has the shape of a phone.", "This device has the shape of a tablet.", - "This device has the shape of a watch or other wearable." + "This device has the shape of a watch or other wearable.", + "This device has a television form factor.", + "This device has an automotive form factor.", + "This device has a desktop form factor.", + "This device has an Extended Reality form factor." ], "type": "string" }, diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index b85a51f468..a88d119d27 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -460,6 +460,10 @@ type AndroidModel struct { // "PHONE" - This device has the shape of a phone. // "TABLET" - This device has the shape of a tablet. // "WEARABLE" - This device has the shape of a watch or other wearable. + // "TV" - This device has a television form factor. + // "AUTOMOTIVE" - This device has an automotive form factor. + // "DESKTOP" - This device has a desktop form factor. + // "XR" - This device has an Extended Reality form factor. FormFactor string `json:"formFactor,omitempty"` // Id: The unique opaque id for this model. Use this for invoking the // TestExecutionService. @@ -1519,6 +1523,10 @@ type IosModel struct { // "PHONE" - This device has the shape of a phone. // "TABLET" - This device has the shape of a tablet. // "WEARABLE" - This device has the shape of a watch or other wearable. + // "TV" - This device has a television form factor. + // "AUTOMOTIVE" - This device has an automotive form factor. + // "DESKTOP" - This device has a desktop form factor. + // "XR" - This device has an Extended Reality form factor. FormFactor string `json:"formFactor,omitempty"` // Id: The unique opaque id for this model. Use this for invoking the // TestExecutionService. diff --git a/transcoder/v1/transcoder-api.json b/transcoder/v1/transcoder-api.json index 735bd377d5..bbb42622d8 100644 --- a/transcoder/v1/transcoder-api.json +++ b/transcoder/v1/transcoder-api.json @@ -385,7 +385,7 @@ } } }, - "revision": "20250630", + "revision": "20250723", "rootUrl": "https://transcoder.googleapis.com/", "schemas": { "AdBreak": { @@ -1155,6 +1155,10 @@ "description": "Input asset.", "id": "Input", "properties": { + "attributes": { + "$ref": "InputAttributes", + "description": "Optional. Input Attributes." + }, "key": { "description": "A unique key for this input. Must be specified when using advanced mapping and edit lists.", "type": "string" @@ -1170,6 +1174,20 @@ }, "type": "object" }, + "InputAttributes": { + "description": "Input attributes that provide additional information about the input asset.", + "id": "InputAttributes", + "properties": { + "trackDefinitions": { + "description": "Optional. A list of track definitions for the input asset.", + "items": { + "$ref": "TrackDefinition" + }, + "type": "array" + } + }, + "type": "object" + }, "Job": { "description": "Transcoding job resource.", "id": "Job", @@ -1814,6 +1832,37 @@ }, "type": "object" }, + "TrackDefinition": { + "description": "Track definition for the input asset.", + "id": "TrackDefinition", + "properties": { + "detectLanguages": { + "description": "Optional. Whether to automatically detect the languages present in the track. If true, the system will attempt to identify all the languages present in the track and populate the languages field.", + "type": "boolean" + }, + "detectedLanguages": { + "description": "Output only. A list of languages detected in the input asset, represented by a BCP 47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. This field is only populated if the detect_languages field is set to true.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "inputTrack": { + "description": "The input track.", + "format": "int32", + "type": "integer" + }, + "languages": { + "description": "Optional. A list of languages spoken in the input asset, represented by a BCP 47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "VideoStream": { "description": "Video stream resource.", "id": "VideoStream", diff --git a/transcoder/v1/transcoder-gen.go b/transcoder/v1/transcoder-gen.go index ebd17a7ba5..6c9f1ed739 100644 --- a/transcoder/v1/transcoder-gen.go +++ b/transcoder/v1/transcoder-gen.go @@ -1276,6 +1276,8 @@ func (s *Image) UnmarshalJSON(data []byte) error { // Input: Input asset. type Input struct { + // Attributes: Optional. Input Attributes. + Attributes *InputAttributes `json:"attributes,omitempty"` // Key: A unique key for this input. Must be specified when using advanced // mapping and edit lists. Key string `json:"key,omitempty"` @@ -1287,15 +1289,15 @@ type Input struct { // output formats // (https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") 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. "Attributes") 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. "Key") 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. "Attributes") 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:"-"` } @@ -1305,6 +1307,29 @@ func (s Input) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InputAttributes: Input attributes that provide additional information about +// the input asset. +type InputAttributes struct { + // TrackDefinitions: Optional. A list of track definitions for the input asset. + TrackDefinitions []*TrackDefinition `json:"trackDefinitions,omitempty"` + // ForceSendFields is a list of field names (e.g. "TrackDefinitions") 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. "TrackDefinitions") 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 InputAttributes) MarshalJSON() ([]byte, error) { + type NoMethod InputAttributes + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Job: Transcoding job resource. type Job struct { // BatchModePriority: The processing priority of a batch job. This field can @@ -2053,6 +2078,43 @@ func (s TextStream) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// TrackDefinition: Track definition for the input asset. +type TrackDefinition struct { + // DetectLanguages: Optional. Whether to automatically detect the languages + // present in the track. If true, the system will attempt to identify all the + // languages present in the track and populate the languages field. + DetectLanguages bool `json:"detectLanguages,omitempty"` + // DetectedLanguages: Output only. A list of languages detected in the input + // asset, represented by a BCP 47 language code, such as "en-US" or "sr-Latn". + // For more information, see + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. This field + // is only populated if the detect_languages field is set to true. + DetectedLanguages []string `json:"detectedLanguages,omitempty"` + // InputTrack: The input track. + InputTrack int64 `json:"inputTrack,omitempty"` + // Languages: Optional. A list of languages spoken in the input asset, + // represented by a BCP 47 language code, such as "en-US" or "sr-Latn". For + // more information, see + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + Languages []string `json:"languages,omitempty"` + // ForceSendFields is a list of field names (e.g. "DetectLanguages") 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. "DetectLanguages") 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 TrackDefinition) MarshalJSON() ([]byte, error) { + type NoMethod TrackDefinition + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VideoStream: Video stream resource. type VideoStream struct { // H264: H264 codec settings. diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 04f72f5258..f51090fcbb 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -2254,7 +2254,7 @@ } } }, - "revision": "20250717", + "revision": "20250724", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -5151,7 +5151,7 @@ "type": "string" }, "network": { - "description": "The network to connect the NIC to.", + "description": "Optional. The network to connect the NIC to.", "type": "string" }, "networkTier": { diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 2e1b800931..d16abcac89 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -3038,7 +3038,7 @@ type NetworkInterface struct { // accepted are: `ephemeral` \ ipv4 address \ a named address resource full // path. InternalIp string `json:"internalIp,omitempty"` - // Network: The network to connect the NIC to. + // Network: Optional. The network to connect the NIC to. Network string `json:"network,omitempty"` // NetworkTier: Optional. The networking tier used for optimizing connectivity // between instances and systems on the internet. Applies only for external diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index 854e45623e..0d5bf58bec 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -2254,7 +2254,7 @@ } } }, - "revision": "20250717", + "revision": "20250724", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -5196,7 +5196,7 @@ "type": "string" }, "network": { - "description": "The network to connect the NIC to.", + "description": "Optional. The network to connect the NIC to.", "type": "string" }, "networkTier": { diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 1cbd1a8a03..802909f7bd 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -3061,7 +3061,7 @@ type NetworkInterface struct { // accepted are: `ephemeral` \ ipv4 address \ a named address resource full // path. InternalIp string `json:"internalIp,omitempty"` - // Network: The network to connect the NIC to. + // Network: Optional. The network to connect the NIC to. Network string `json:"network,omitempty"` // NetworkTier: Optional. The networking tier used for optimizing connectivity // between instances and systems on the internet. Applies only for external diff --git a/workloadmanager/v1/workloadmanager-api.json b/workloadmanager/v1/workloadmanager-api.json index 38869f6b9a..0d8b43eced 100644 --- a/workloadmanager/v1/workloadmanager-api.json +++ b/workloadmanager/v1/workloadmanager-api.json @@ -879,7 +879,7 @@ } } }, - "revision": "20250714", + "revision": "20250727", "rootUrl": "https://workloadmanager.googleapis.com/", "schemas": { "AgentCommand": { @@ -900,6 +900,21 @@ }, "type": "object" }, + "AgentStates": { + "description": "Agent status.", + "id": "AgentStates", + "properties": { + "availableVersion": { + "description": "Optional. The available version of the agent in artifact registry.", + "type": "string" + }, + "installedVersion": { + "description": "Optional. The installed version of the agent on the host.", + "type": "string" + } + }, + "type": "object" + }, "AgentStatus": { "description": "The schema of agent status data.", "id": "AgentStatus", @@ -1367,6 +1382,10 @@ ], "type": "string" }, + "kmsKey": { + "description": "Optional. Immutable. Customer-managed encryption key name, in the format projects/*/locations/*/keyRings/*/cryptoKeys/*.", + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" @@ -2807,6 +2826,10 @@ "description": "SAP instance properties.", "id": "SapInstanceProperties", "properties": { + "agentStates": { + "$ref": "AgentStates", + "description": "Optional. Sap Instance Agent status." + }, "numbers": { "description": "Optional. SAP Instance numbers. They are from '00' to '99'.", "items": { diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go index 283289354b..d5f4c1f5a5 100644 --- a/workloadmanager/v1/workloadmanager-gen.go +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -298,6 +298,31 @@ func (s AgentCommand) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AgentStates: Agent status. +type AgentStates struct { + // AvailableVersion: Optional. The available version of the agent in artifact + // registry. + AvailableVersion string `json:"availableVersion,omitempty"` + // InstalledVersion: Optional. The installed version of the agent on the host. + InstalledVersion string `json:"installedVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "AvailableVersion") 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. "AvailableVersion") 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 AgentStates) MarshalJSON() ([]byte, error) { + type NoMethod AgentStates + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // AgentStatus: The schema of agent status data. type AgentStatus struct { // AgentName: Output only. The name of the agent. @@ -721,6 +746,9 @@ type Evaluation struct { // "OTHER" - Customized best practices // "SCC_IAC" - SCC IaC (Infra as Code) best practices. EvaluationType string `json:"evaluationType,omitempty"` + // KmsKey: Optional. Immutable. Customer-managed encryption key name, in the + // format projects/*/locations/*/keyRings/*/cryptoKeys/*. + KmsKey string `json:"kmsKey,omitempty"` // Labels: Labels as key value pairs Labels map[string]string `json:"labels,omitempty"` // Name: name of resource names have the form @@ -2190,15 +2218,17 @@ func (s SapDiscoveryWorkloadPropertiesSoftwareComponentProperties) MarshalJSON() // SapInstanceProperties: SAP instance properties. type SapInstanceProperties struct { + // AgentStates: Optional. Sap Instance Agent status. + AgentStates *AgentStates `json:"agentStates,omitempty"` // Numbers: Optional. SAP Instance numbers. They are from '00' to '99'. Numbers []string `json:"numbers,omitempty"` - // ForceSendFields is a list of field names (e.g. "Numbers") 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. "AgentStates") 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. "Numbers") to include in API + // NullFields is a list of field names (e.g. "AgentStates") 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/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json index d65be5cee2..a02bf86930 100644 --- a/workstations/v1beta/workstations-api.json +++ b/workstations/v1beta/workstations-api.json @@ -1142,7 +1142,7 @@ } } }, - "revision": "20250716", + "revision": "20250729", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1460,7 +1460,7 @@ }, "reservationAffinity": { "$ref": "ReservationAffinity", - "description": "Optional. [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) specifies a reservation that can be consumed to create boost VM instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations will only create VMs in the zone where the reservation is located. This would affect availability since the service will no longer be resilient to zonal outages. If ANY_RESERVATION is specified, creating reservations in both zones that the config creates VMs in will ensure higher availability. **Important Considerations for Reservation Affinity:** * This feature is intended for advanced users and requires familiarity with Google Compute Engine reservations. * Using reservations incurs charges, regardless of utilization. * The resources in the pool will consume the specified reservation. Take this into account when setting the pool size." + "description": "Optional. [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) specifies a reservation that can be consumed to create VM instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations will only create VMs in the zone where the reservation is located. This would affect availability since the service will no longer be resilient to zonal outages. If ANY_RESERVATION is specified, creating reservations in both zones that the config creates VMs in will ensure higher availability. **Important Considerations for Reservation Affinity:** * This feature is intended for advanced users and requires familiarity with Google Compute Engine reservations. * Using reservations incurs charges, regardless of utilization. * The resources in the pool will consume the specified reservation. Take this into account when setting the pool size." }, "serviceAccount": { "description": "Optional. The email address of the service account for Cloud Workstations VMs created with this configuration. When specified, be sure that the service account has `logging.logEntries.create` and `monitoring.timeSeries.create` permissions on the project so it can write logs out to Cloud Logging. If using a custom container image, the service account must have [Artifact Registry Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) permission to pull the specified image. If you as the administrator want to be able to `ssh` into the underlying VM, you need to set this value to a service account for which you have the `iam.serviceAccounts.actAs` permission. Conversely, if you don't want anyone to be able to `ssh` into the underlying VM, use a service account where no one has that permission. If not set, VMs run with a service account provided by the Cloud Workstations service, and the image must be publicly accessible.", @@ -2020,7 +2020,7 @@ "type": "string" }, "values": { - "description": "Optional. Corresponds to the label values of reservation resources. Valid values are either a name to a reservation in the same project or \"projects/{project}/reservations/{reservation}\" to target a shared reservation in the same zone but in a different project.", + "description": "Optional. Corresponds to the label values of reservation resources. Valid values are either the name of a reservation in the same project or \"projects/{project}/reservations/{reservation}\" to target a shared reservation in the same zone but in a different project.", "items": { "type": "string" }, diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index 06d3a2cffb..a8901a8f97 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -789,12 +789,12 @@ type GceInstance struct { PooledInstances int64 `json:"pooledInstances,omitempty"` // ReservationAffinity: Optional. ReservationAffinity // (https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - // specifies a reservation that can be consumed to create boost VM instances. - // If SPECIFIC_RESERVATION is specified, Cloud Workstations will only create - // VMs in the zone where the reservation is located. This would affect - // availability since the service will no longer be resilient to zonal outages. - // If ANY_RESERVATION is specified, creating reservations in both zones that - // the config creates VMs in will ensure higher availability. **Important + // specifies a reservation that can be consumed to create VM instances. If + // SPECIFIC_RESERVATION is specified, Cloud Workstations will only create VMs + // in the zone where the reservation is located. This would affect availability + // since the service will no longer be resilient to zonal outages. If + // ANY_RESERVATION is specified, creating reservations in both zones that the + // config creates VMs in will ensure higher availability. **Important // Considerations for Reservation Affinity:** * This feature is intended for // advanced users and requires familiarity with Google Compute Engine // reservations. * Using reservations incurs charges, regardless of @@ -1626,7 +1626,7 @@ type ReservationAffinity struct { // Key: Optional. Corresponds to the label key of reservation resource. Key string `json:"key,omitempty"` // Values: Optional. Corresponds to the label values of reservation resources. - // Valid values are either a name to a reservation in the same project or + // Valid values are either the name of a reservation in the same project or // "projects/{project}/reservations/{reservation}" to target a shared // reservation in the same zone but in a different project. Values []string `json:"values,omitempty"`